2003-09-25 20:15:53 +00:00
|
|
|
/*
|
2004-04-04 13:46:03 +00:00
|
|
|
* GRUB -- GRand Unified Bootloader
|
2007-07-21 23:32:33 +00:00
|
|
|
* Copyright (C) 2003,2007 Free Software Foundation, Inc.
|
2003-09-25 20:15:53 +00:00
|
|
|
*
|
2007-07-21 23:32:33 +00:00
|
|
|
* GRUB is free software: you can redistribute it and/or modify
|
2003-09-25 20:15:53 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2007-07-21 23:32:33 +00:00
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
2003-09-25 20:15:53 +00:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2007-07-21 23:32:33 +00:00
|
|
|
* GRUB is distributed in the hope that it will be useful,
|
2003-09-25 20:15:53 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2007-07-21 23:32:33 +00:00
|
|
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
2003-09-25 20:15:53 +00:00
|
|
|
*/
|
|
|
|
|
2004-04-04 13:46:03 +00:00
|
|
|
#ifndef GRUB_FONT_HEADER
|
|
|
|
#define GRUB_FONT_HEADER 1
|
2003-09-25 20:15:53 +00:00
|
|
|
|
2004-04-04 13:46:03 +00:00
|
|
|
#include <grub/types.h>
|
2003-09-25 20:15:53 +00:00
|
|
|
|
2004-04-04 13:46:03 +00:00
|
|
|
#define GRUB_FONT_MAGIC "PPF\x7f"
|
2003-09-25 20:15:53 +00:00
|
|
|
|
2006-03-14 19:08:34 +00:00
|
|
|
struct grub_font_glyph
|
|
|
|
{
|
|
|
|
/* Glyph width in pixels. */
|
|
|
|
grub_uint8_t width;
|
|
|
|
|
|
|
|
/* Glyph height in pixels. */
|
|
|
|
grub_uint8_t height;
|
|
|
|
|
|
|
|
/* Glyph width in characters. */
|
|
|
|
grub_uint8_t char_width;
|
|
|
|
|
|
|
|
/* Glyph baseline position in pixels (from up). */
|
|
|
|
grub_uint8_t baseline;
|
|
|
|
|
|
|
|
/* Glyph bitmap data array of bytes in ((width + 7) / 8) * height.
|
|
|
|
Bitmap is formulated by height scanlines, each scanline having
|
|
|
|
width number of pixels. Pixels are coded as bits, value 1 meaning
|
|
|
|
of opaque pixel and 0 is transparent. If width does not fit byte
|
|
|
|
boundary, it will be padded with 0 to make it fit. */
|
|
|
|
grub_uint8_t bitmap[32];
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct grub_font_glyph *grub_font_glyph_t;
|
|
|
|
|
2004-04-04 13:46:03 +00:00
|
|
|
int grub_font_get_glyph (grub_uint32_t code,
|
2006-03-14 19:08:34 +00:00
|
|
|
grub_font_glyph_t glyph);
|
2003-09-25 20:15:53 +00:00
|
|
|
|
2004-04-04 13:46:03 +00:00
|
|
|
#endif /* ! GRUB_FONT_HEADER */
|