9
0
Fork 0

lib/fonts: add "MINI4x6" font

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Antony Pavlov 2015-07-10 00:25:53 +03:00 committed by Sascha Hauer
parent e5138e2d3e
commit b6b96ee6fd
5 changed files with 2166 additions and 1 deletions

View File

@ -19,7 +19,8 @@ struct font_desc {
const void *data; const void *data;
}; };
extern const struct font_desc font_vga_8x16; extern const struct font_desc font_vga_8x16,
font_mini_4x6;
/* Max. length for the name of a predefined font */ /* Max. length for the name of a predefined font */
#define MAX_FONT_NAME 32 #define MAX_FONT_NAME 32

View File

@ -14,8 +14,12 @@ config FONT_8x16
This is the "high resolution" font for the VGA frame buffer (the one This is the "high resolution" font for the VGA frame buffer (the one
provided by the VGA text console 80x25 mode). provided by the VGA text console 80x25 mode).
config FONT_MINI_4x6
bool "Mini 4x6 font"
config FONT_AUTOSELECT config FONT_AUTOSELECT
def_bool y def_bool y
depends on !FONT_MINI_4x6
select FONT_8x16 select FONT_8x16
endif # FONTS endif # FONTS

View File

@ -3,6 +3,7 @@
font-objs := fonts.o font-objs := fonts.o
font-objs-$(CONFIG_FONT_8x16) += font_8x16.o font-objs-$(CONFIG_FONT_8x16) += font_8x16.o
font-objs-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o
font-objs += $(font-objs-y) font-objs += $(font-objs-y)

2155
lib/fonts/font_mini_4x6.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -25,6 +25,10 @@ static const struct font_desc *fonts[] = {
#undef NO_FONTS #undef NO_FONTS
&font_vga_8x16, &font_vga_8x16,
#endif #endif
#ifdef CONFIG_FONT_MINI_4x6
#undef NO_FONTS
&font_mini_4x6,
#endif
}; };
#define num_fonts ARRAY_SIZE(fonts) #define num_fonts ARRAY_SIZE(fonts)