]>
git.proxmox.com Git - grub2.git/blob - include/grub/font.h
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2003 Free Software Foundation, Inc.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef GRUB_FONT_HEADER
21 #define GRUB_FONT_HEADER 1
23 #include <grub/types.h>
25 #define GRUB_FONT_MAGIC "PPF\x7f"
27 struct grub_font_glyph
29 /* Glyph width in pixels. */
32 /* Glyph height in pixels. */
35 /* Glyph width in characters. */
36 grub_uint8_t char_width
;
38 /* Glyph baseline position in pixels (from up). */
39 grub_uint8_t baseline
;
41 /* Glyph bitmap data array of bytes in ((width + 7) / 8) * height.
42 Bitmap is formulated by height scanlines, each scanline having
43 width number of pixels. Pixels are coded as bits, value 1 meaning
44 of opaque pixel and 0 is transparent. If width does not fit byte
45 boundary, it will be padded with 0 to make it fit. */
46 grub_uint8_t bitmap
[32];
49 typedef struct grub_font_glyph
*grub_font_glyph_t
;
51 int grub_font_get_glyph (grub_uint32_t code
,
52 grub_font_glyph_t glyph
);
54 #endif /* ! GRUB_FONT_HEADER */