Skip to contentSkip to conversation

Fonts: New Terminus large console font

PATCH Superseded Amanoel Dawod 3 participants 5 messages Nov 26, 2018 – Dec 6, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fonts: New Terminus large console font

This patch adds an option to compile-in a high resolution and large Terminus (ter16x32) bitmap console font for use with HiDPI and Retina screens.

The font was convereted from standard Terminus ter-i32b.psf (size 16x32) with the help of psftools and minor hand editing deleting useless characters.

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.

---
 include/linux/font.h      |    4 +-
 lib/fonts/Kconfig         |   10 +
 lib/fonts/Makefile        |    1 +
 lib/fonts/font_ter16x32.c | 2072 +++++++++++++++++++++++++++++++++++++
 lib/fonts/fonts.c         |    4 +
 5 files changed, 2090 insertions(+), 1 deletion(-)
 create mode 100644 lib/fonts/font_ter16x32.c
include/linux/font.h +3 -1
index d6821769dd1e..51b91c8b69d5 100644
@@ -32,6 +32,7 @@ struct font_desc {
 #define ACORN8x8_IDX	8
 #define	MINI4x6_IDX	9
 #define FONT6x10_IDX	10
+#define TER16x32_IDX	11
 
 extern const struct font_desc	font_vga_8x8,
 			font_vga_8x16,
@@ -43,7 +44,8 @@ extern const struct font_desc	font_vga_8x8,
 			font_sun_12x22,
 			font_acorn_8x8,
 			font_mini_4x6,
-			font_6x10;
+			font_6x10,
+			font_ter_16x32;
 
 /* Find a font with a specific name */
 
lib/fonts/Kconfig +10 -0
index 8fa0791e8a1e..3ecdd5204ec5 100644
@@ -109,6 +109,15 @@ config FONT_SUN12x22
 	  big letters (like the letters used in the SPARC PROM). If the
 	  standard font is unreadable for you, say Y, otherwise say N.
 
+config FONT_TER16x32
+	bool "Terminus 16x32 font (not supported by all drivers)"
+	depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)
+	help
+	  Terminus Font is a clean, fixed width bitmap font, designed
+	  for long (8 and more hours per day) work with computers.
+	  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_AUTOSELECT
 	def_bool y
 	depends on !FONT_8x8
@@ -121,6 +130,7 @@ config FONT_AUTOSELECT
 	depends on !FONT_SUN8x16
 	depends on !FONT_SUN12x22
 	depends on !FONT_10x18
+	depends on !FONT_TER16x32
 	select FONT_8x16
 
 endif # FONT_SUPPORT
lib/fonts/Makefile +1 -0
index d56f02dea83a..ed95070860de 100644
@@ -14,6 +14,7 @@ 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_TER16x32)  += font_ter16x32.o
 
 font-objs += $(font-objs-y)
 
lib/fonts/font_ter16x32.c new file +2072 -0

2,072 lines not on this page · raw message

lib/fonts/fonts.c +4 -0
index 823376ca0a8b..9969358a7af5 100644
@@ -67,6 +67,10 @@ static const struct font_desc *fonts[] = {
 #undef NO_FONTS
     &font_6x10,
 #endif
+#ifdef CONFIG_FONT_TER16x32
+#undef NO_FONTS
+    &font_ter_16x32,
+#endif
 };
 
 #define num_fonts ARRAY_SIZE(fonts)
Signature · 1 line
2.19.1
#1 lore raw
Quoted 10 lines · Amanoel Dawod

This patch adds an option to compile-in a high resolution and large Terminus (ter16x32) bitmap console font for use with HiDPI and Retina screens.

The font was convereted from standard Terminus ter-i32b.psf (size 16x32) with the help of psftools and minor hand editing deleting useless characters.

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.

Can you please run scripts/checkpatch.pl and fix up the issues that it finds in this patch. It's a lot:

	total: 1792 errors, 2058 warnings, 2127 lines checked

thanks,

greg k-h

#2 lore raw

PATCH v2 1/1 Fonts: New Terminus large console font

This patch adds an option to compile-in a high resolution and large Terminus (ter16x32) bitmap console font for use with HiDPI and Retina screens.

The font was convereted from standard Terminus ter-i32b.psf (size 16x32) with the help of psftools and minor hand editing deleting useless characters.

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:
- modified commit message
- fixed trailing whitespaces errors

 include/linux/font.h      |    4 +-
 lib/fonts/Kconfig         |   10 +
 lib/fonts/Makefile        |    1 +
 lib/fonts/font_ter16x32.c | 2072 +++++++++++++++++++++++++++++++++++++
 lib/fonts/fonts.c         |    4 +
 5 files changed, 2090 insertions(+), 1 deletion(-)
 create mode 100644 lib/fonts/font_ter16x32.c
include/linux/font.h +3 -1
index d6821769dd1e..51b91c8b69d5 100644
@@ -32,6 +32,7 @@ struct font_desc {
 #define ACORN8x8_IDX	8
 #define	MINI4x6_IDX	9
 #define FONT6x10_IDX	10
+#define TER16x32_IDX	11
 
 extern const struct font_desc	font_vga_8x8,
 			font_vga_8x16,
@@ -43,7 +44,8 @@ extern const struct font_desc	font_vga_8x8,
 			font_sun_12x22,
 			font_acorn_8x8,
 			font_mini_4x6,
-			font_6x10;
+			font_6x10,
+			font_ter_16x32;
 
 /* Find a font with a specific name */
 
lib/fonts/Kconfig +10 -0
index 8fa0791e8a1e..3ecdd5204ec5 100644
@@ -109,6 +109,15 @@ config FONT_SUN12x22
 	  big letters (like the letters used in the SPARC PROM). If the
 	  standard font is unreadable for you, say Y, otherwise say N.
 
+config FONT_TER16x32
+	bool "Terminus 16x32 font (not supported by all drivers)"
+	depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)
+	help
+	  Terminus Font is a clean, fixed width bitmap font, designed
+	  for long (8 and more hours per day) work with computers.
+	  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_AUTOSELECT
 	def_bool y
 	depends on !FONT_8x8
@@ -121,6 +130,7 @@ config FONT_AUTOSELECT
 	depends on !FONT_SUN8x16
 	depends on !FONT_SUN12x22
 	depends on !FONT_10x18
+	depends on !FONT_TER16x32
 	select FONT_8x16
 
 endif # FONT_SUPPORT
lib/fonts/Makefile +1 -0
index d56f02dea83a..ed95070860de 100644
@@ -14,6 +14,7 @@ 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_TER16x32)  += font_ter16x32.o
 
 font-objs += $(font-objs-y)
 
lib/fonts/font_ter16x32.c new file +2072 -0

2,072 lines not on this page · raw message

lib/fonts/fonts.c +4 -0
index 823376ca0a8b..9969358a7af5 100644
@@ -67,6 +67,10 @@ static const struct font_desc *fonts[] = {
 #undef NO_FONTS
     &font_6x10,
 #endif
+#ifdef CONFIG_FONT_TER16x32
+#undef NO_FONTS
+    &font_ter_16x32,
+#endif
 };
 
 #define num_fonts ARRAY_SIZE(fonts)
Signature · 1 line
2.19.2
#3 lore raw
Quoted 5 lines · Amanoel Dawod

This patch adds an option to compile-in a high resolution and large Terminus (ter16x32) bitmap console font for use with HiDPI and Retina screens.

The font was convereted from standard Terminus ter-i32b.psf

converted

Where does "ter-i32b.psf" come from?
I.e., where can I find it?

Quoted 12 lines

(size 16x32) with the help of psftools and minor hand editing deleting useless characters.

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.

---

lib/fonts/font_ter16x32.c line 2066

Quoted 6 lines
lib/fonts/font_ter16x32.c new file +6 -0
+const struct font_desc font_ter_16x32 = {
+	.idx	= TER16x32_IDX,
+	.name	= "TER16x32",
+	.width	= 16,
+	.height = 32,
+	.data	= fontdata_ter16x32,

Please update Documentation/fb/fbcon.txt with the addition of that font name if that is applicable.

thanks,

Signature · 1 line
~Randy
#4 lore raw
Quoted 5 lines · Randy Dunlap

converted

Where does "ter-i32b.psf" come from?
I.e., where can I find it?

The Unix/Linux Terminus sources are available for download at SourceForge. Simply running "make" in source directory will build the .psf font files.