Skip to contentSkip to conversation

Fonts: Adding all Terminus fronts from 12 to 32 in bold, and normal versions

PATCH Superseded Pavel Nikulin 1 participant 1 message Jun 17, 2025 Framebuffer console

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Fonts: Adding all Terminus fronts from 12 to 32 in bold, and normal versions

This patch adds an option to compile-in all terminus fonts, and removed the old bold only terminus version

These fonts were converted from Terminus psf files with the help of psftools and a script.

This patch is non-intrusive, no options are enabled by default so most users won't notice a thing.

I am placing my changes under the GPL 2.0 just as source Terminus font.

---
Changes in v2:
— Typos fixes
— Font names made to match the existing convention, so FONT_TER16x32 stays the
same
— "not supported by all drivers" config note only left for non-multiple of
8 sizes
— File names now match the font names for fbcon=font: parameter
- Bold font version stays with B postfix, regulal has none to match existing termunus 16x32 font
— Link to v1: https://lore.kernel.org/[email protected]

 include/linux/font.h       |   36 +-
 lib/fonts/Kconfig          |  148 +-
 lib/fonts/Makefile         |   16 +
 lib/fonts/font_ter10x18.c  | 1305 ++++++++++++
 lib/fonts/font_ter10x18b.c | 1305 ++++++++++++
 lib/fonts/font_ter10x20.c  | 1305 ++++++++++++
 lib/fonts/font_ter10x20b.c | 1305 ++++++++++++
 lib/fonts/font_ter11x22.c  | 1561 ++++++++++++++
 lib/fonts/font_ter11x22b.c | 1561 ++++++++++++++
 lib/fonts/font_ter12x24.c  | 1561 ++++++++++++++
 lib/fonts/font_ter12x24b.c | 1561 ++++++++++++++
 lib/fonts/font_ter14x28.c  | 1817 ++++++++++++++++
 lib/fonts/font_ter14x28b.c | 1817 ++++++++++++++++
 lib/fonts/font_ter16x32.c  | 4107 ++++++++++++++++++------------------
 lib/fonts/font_ter16x32b.c | 2073 ++++++++++++++++++
 lib/fonts/font_ter6x12.c   |  537 +++++
 lib/fonts/font_ter8x14.c   |  537 +++++
 lib/fonts/font_ter8x14b.c  |  537 +++++
 lib/fonts/font_ter8x16.c   |  537 +++++
 lib/fonts/font_ter8x16b.c  |  537 +++++
 lib/fonts/fonts.c          |   48 +
 21 files changed, 22153 insertions(+), 2058 deletions(-)
 create mode 100644 lib/fonts/font_ter10x18.c
 create mode 100644 lib/fonts/font_ter10x18b.c
 create mode 100644 lib/fonts/font_ter10x20.c
 create mode 100644 lib/fonts/font_ter10x20b.c
 create mode 100644 lib/fonts/font_ter11x22.c
 create mode 100644 lib/fonts/font_ter11x22b.c
 create mode 100644 lib/fonts/font_ter12x24.c
 create mode 100644 lib/fonts/font_ter12x24b.c
 create mode 100644 lib/fonts/font_ter14x28.c
 create mode 100644 lib/fonts/font_ter14x28b.c
 create mode 100644 lib/fonts/font_ter16x32b.c
 create mode 100644 lib/fonts/font_ter6x12.c
 create mode 100644 lib/fonts/font_ter8x14.c
 create mode 100644 lib/fonts/font_ter8x14b.c
 create mode 100644 lib/fonts/font_ter8x16.c
 create mode 100644 lib/fonts/font_ter8x16b.c
include/linux/font.h +34 -2
index 81caffd51bb4..3850b4fb1820 100644
@@ -33,8 +33,24 @@ struct font_desc {
 #define ACORN8x8_IDX	8
 #define	MINI4x6_IDX	9
 #define FONT6x10_IDX	10
-#define TER16x32_IDX	11
-#define FONT6x8_IDX	12
+#define TER6x12_IDX	11
+#define TER8x14_IDX	12
+#define TER8x14B_IDX	13
+#define TER8x16_IDX	14
+#define TER8x16B_IDX	15
+#define TER10x18_IDX	16
+#define TER10x18B_IDX	17
+#define TER10x20_IDX	18
+#define TER10x20B_IDX	19
+#define TER11x22_IDX	20
+#define TER11x22B_IDX	21
+#define TER12x24_IDX	22
+#define TER12x24B_IDX	23
+#define TER14x28_IDX	24
+#define TER14x28B_IDX	25
+#define TER16x32_IDX	26
+#define TER16x32B_IDX	27
+#define FONT6x8_IDX	28
 
 extern const struct font_desc	font_vga_8x8,
 			font_vga_8x16,
@@ -47,7 +63,23 @@ extern const struct font_desc	font_vga_8x8,
 			font_acorn_8x8,
 			font_mini_4x6,
 			font_6x10,
+			font_ter_6x12,
+			font_ter_8x14,
+			font_ter_8x14b,
+			font_ter_8x16,
+			font_ter_8x16b,
+			font_ter_10x18,
+			font_ter_10x18b,
+			font_ter_10x20,
+			font_ter_10x20b,
+			font_ter_11x22,
+			font_ter_11x22b,
+			font_ter_12x24,
+			font_ter_12x24b,
+			font_ter_14x28,
+			font_ter_14x28b,
 			font_ter_16x32,
+			font_ter_16x32b,
 			font_6x8;
 
 /* Find a font with a specific name */
lib/fonts/Kconfig +145 -3

167 lines not on this page · raw message

lib/fonts/Makefile +16 -0
index e16f68492174..55be143650b7 100644
@@ -14,7 +14,23 @@ font-objs-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o
 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_TER6x12)  += font_ter6x12.o
+font-objs-$(CONFIG_FONT_TER8x14)  += font_ter8x14.o
+font-objs-$(CONFIG_FONT_TER8x14B)  += font_ter8x14b.o
+font-objs-$(CONFIG_FONT_TER8x16)  += font_ter8x16.o
+font-objs-$(CONFIG_FONT_TER8x16B)  += font_ter8x16b.o
+font-objs-$(CONFIG_FONT_TER10x18)  += font_ter10x18.o
+font-objs-$(CONFIG_FONT_TER10x18B)  += font_ter10x18b.o
+font-objs-$(CONFIG_FONT_TER10x20)  += font_ter10x20.o
+font-objs-$(CONFIG_FONT_TER10x20B)  += font_ter10x20b.o
+font-objs-$(CONFIG_FONT_TER11x22)  += font_ter11x22.o
+font-objs-$(CONFIG_FONT_TER11x22B)  += font_ter11x22b.o
+font-objs-$(CONFIG_FONT_TER12x24)  += font_ter12x24.o
+font-objs-$(CONFIG_FONT_TER12x24B)  += font_ter12x24b.o
+font-objs-$(CONFIG_FONT_TER14x28)  += font_ter14x28.o
+font-objs-$(CONFIG_FONT_TER14x28B)  += font_ter14x28b.o
 font-objs-$(CONFIG_FONT_TER16x32)  += font_ter16x32.o
+font-objs-$(CONFIG_FONT_TER16x32B)  += font_ter16x32b.o
 font-objs-$(CONFIG_FONT_6x8)       += font_6x8.o
 
 font-objs += $(font-objs-y)
lib/fonts/font_ter10x18.c new file +1305 -0

1,305 lines not on this page · raw message

lib/fonts/font_ter10x18b.c new file +1305 -0

1,305 lines not on this page · raw message

lib/fonts/font_ter10x20.c new file +1305 -0

151 lines not on this page · raw message

lib/fonts/font_ter10x20b.c new file +1305 -0

1,305 lines not on this page · raw message

lib/fonts/font_ter11x22.c new file +1561 -0

1,561 lines not on this page · raw message

lib/fonts/font_ter11x22b.c new file +1561 -0

1,561 lines not on this page · raw message

lib/fonts/font_ter12x24.c new file +1561 -0

1,561 lines not on this page · raw message

lib/fonts/font_ter12x24b.c new file +1561 -0

1,561 lines not on this page · raw message

lib/fonts/font_ter14x28.c new file +1817 -0

1,817 lines not on this page · raw message

lib/fonts/font_ter14x28b.c new file +1817 -0

1,817 lines not on this page · raw message

lib/fonts/font_ter16x32.c +2054 -2053

4,107 lines not on this page · raw message

lib/fonts/font_ter16x32b.c new file +2073 -0

2,073 lines not on this page · raw message

lib/fonts/font_ter6x12.c new file +537 -0

537 lines not on this page · raw message

lib/fonts/font_ter8x14.c new file +537 -0

537 lines not on this page · raw message

lib/fonts/font_ter8x14b.c new file +537 -0

537 lines not on this page · raw message

lib/fonts/font_ter8x16.c new file +537 -0

537 lines not on this page · raw message

lib/fonts/font_ter8x16b.c new file +537 -0

537 lines not on this page · raw message

lib/fonts/fonts.c +48 -0

48 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

base-commit: 546b1c9e93c2bb8cf5ed24e0be1c86bb089b3253
prerequisite-patch-id: 4f84b130aa364ea767b67083d8832a314d3fdf8d
prerequisite-patch-id: 3493e876f97d253c5000736864bff14104ed3cbf
prerequisite-patch-id: c4ba8bbb92d003c3dc67293ede3e5a0de724235e
prerequisite-patch-id: b08138c8a0ec6599e85b920a102d246d0eaf7a86

Signature · 1 line
2.49.0

Part of the diff is not shown here. View the raw message.