Commit e2028c8e authored by Sven Schneider's avatar Sven Schneider Committed by Bartlomiej Zolnierkiewicz
Browse files

lib/fonts: add font 6x8 for OLED display

parent a91df118
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ struct font_desc {
#define	MINI4x6_IDX	9
#define FONT6x10_IDX	10
#define TER16x32_IDX	11
#define FONT6x8_IDX	12

extern const struct font_desc	font_vga_8x8,
			font_vga_8x16,
@@ -45,7 +46,8 @@ extern const struct font_desc font_vga_8x8,
			font_acorn_8x8,
			font_mini_4x6,
			font_6x10,
			font_ter_16x32;
			font_ter_16x32,
			font_6x8;

/* Find a font with a specific name */

+7 −0
Original line number Diff line number Diff line
@@ -119,6 +119,12 @@ config FONT_TER16x32
	  This is the high resolution, large version for use with HiDPI screens.
	  If the standard font is unreadable for you, say Y, otherwise say N.

config FONT_6x8
	bool "OLED 6x8 font" if FONTS
	depends on FRAMEBUFFER_CONSOLE
	help
	  This font is useful for small displays (OLED).

config FONT_AUTOSELECT
	def_bool y
	depends on !FONT_8x8
@@ -132,6 +138,7 @@ config FONT_AUTOSELECT
	depends on !FONT_SUN12x22
	depends on !FONT_10x18
	depends on !FONT_TER16x32
	depends on !FONT_6x8
	select FONT_8x16

endif # FONT_SUPPORT
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ font-objs-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o
font-objs-$(CONFIG_FONT_MINI_4x6)  += font_mini_4x6.o
font-objs-$(CONFIG_FONT_6x10)      += font_6x10.o
font-objs-$(CONFIG_FONT_TER16x32)  += font_ter16x32.o
font-objs-$(CONFIG_FONT_6x8)       += font_6x8.o

font-objs += $(font-objs-y)

lib/fonts/font_6x8.c

0 → 100644
+2576 −0

File added.

Preview size limit exceeded, changes collapsed.

+3 −0
Original line number Diff line number Diff line
@@ -57,6 +57,9 @@ static const struct font_desc *fonts[] = {
#ifdef CONFIG_FONT_TER16x32
	&font_ter_16x32,
#endif
#ifdef CONFIG_FONT_6x8
	&font_6x8,
#endif
};

#define num_fonts ARRAY_SIZE(fonts)