2010-01-10 Carles Pina i Estany <carles@pina.cat>
* font/font.c: Include `ascii.h'. (ASCII_BITMAP_SIZE): New macro. (ascii_font_glyph): Define. (ascii_glyph_lookup): New function. (grub_font_get_string_width): Change comment. If glyph not found, use ascii_glyph_lookup. (grub_font_get_glyph_with_fallback): If glyph not available returns ascii_glyph_lookup. * util/grub-mkfont.c (file_formats): New enum. (options): Add `ascii-bitmaps' new option. (usage): Add `asii-bitmaps' new option. (write_font_ascii_bitmap): New function. (write_font): Rename to ... (write_font_p2): ... this. Remove print_glyphs call. (main): Use file_format. Implement code for ranges if ascii-bitmaps is used. Call print_glyphs. * Makefile.in (pkgdata_DATA): Add `font/ascii.h'.
This commit is contained in:
parent
f40f890a12
commit
26ba5c2262
4 changed files with 154 additions and 12 deletions
|
@ -234,7 +234,7 @@ else
|
|||
|
||||
ifeq ($(enable_grub_mkfont),yes)
|
||||
|
||||
pkgdata_DATA += unicode.pf2 ascii.pf2
|
||||
pkgdata_DATA += unicode.pf2 ascii.pf2 font/ascii.h
|
||||
|
||||
# Arrows and lines are needed to draw the menu, so we always include them
|
||||
UNICODE_ARROWS=0x2190-0x2193
|
||||
|
@ -245,6 +245,12 @@ unicode.pf2: $(FONT_SOURCE) grub-mkfont
|
|||
|
||||
ascii.pf2: $(FONT_SOURCE) grub-mkfont
|
||||
$(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES)
|
||||
|
||||
font/ascii.bitmaps: $(FONT_SOURCE) grub-mkfont
|
||||
$(builddir)/grub-mkfont --ascii-bitmaps -o $@ $(FONT_SOURCE)
|
||||
|
||||
font/ascii.h: font/ascii.bitmaps grub-bin2h
|
||||
$(builddir)/grub-bin2h ascii_bitmaps 2048 < font/ascii.bitmaps > font/ascii.h
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue