Skip to content

Commit

Permalink
tty: Add Chinese fonts support in console
Browse files Browse the repository at this point in the history
Signed-off-by: Haiyong Sun <[email protected]>
Signed-off-by: Huacai Chen <[email protected]>
  • Loading branch information
chenhuacai committed Oct 17, 2024
1 parent c4b80b8 commit bf63fb3
Show file tree
Hide file tree
Showing 5 changed files with 135,210 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/linux/font.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ struct font_desc {
#define FONT6x10_IDX 10
#define TER16x32_IDX 11
#define FONT6x8_IDX 12
#define UTF8x16_IDX 13

extern const struct font_desc font_vga_8x8,
font_vga_8x16,
Expand All @@ -48,7 +49,8 @@ extern const struct font_desc font_vga_8x8,
font_mini_4x6,
font_6x10,
font_ter_16x32,
font_6x8;
font_6x8,
font_utf8_8x16;

/* Find a font with a specific name */

Expand Down
12 changes: 12 additions & 0 deletions lib/fonts/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ config FONT_8x16

If unsure, say Y.

config FONT_UTF8x16
bool "UTF-8 8x16 font" if FONTS
depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE || STI_CONSOLE || USB_SISUSBVGA_CON
default y
help
This is the "high resolution" font for the VGA frame buffer (the one
provided by the VGA text console 80x25 mode.

If unsure, say Y.


config FONT_6x11
bool "Mac console 6x11 font (not supported by all drivers)" if FONTS
depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE || DRM_PANIC
Expand Down Expand Up @@ -142,6 +153,7 @@ config FONT_AUTOSELECT
depends on !FONT_10x18
depends on !FONT_TER16x32
depends on !FONT_6x8
depends on !FONT_UTF8x16
select FONT_8x16

endif # FONT_SUPPORT
1 change: 1 addition & 0 deletions lib/fonts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ 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-$(CONFIG_FONT_UTF8x16) += font_utf8x16.o

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

Expand Down
Loading

0 comments on commit bf63fb3

Please sign in to comment.