From 18cd295b33dc306e32f5acf18911363577cf4fa2 Mon Sep 17 00:00:00 2001 From: Vovanium Date: Tue, 5 Jul 2022 18:09:40 +0300 Subject: [PATCH] Font naming scheme explained (plus corrections in font names) --- README.md | 37 ++++++++++++++++++++++++++++++++++--- mono/salut-mono11w.bdf | 4 ++-- mono/salut-mono12w.bdf | 4 ++-- mono/salut-mono16w.bdf | 4 ++-- tools/check-coverage.awk | 31 +++++++++++++++++++++++++++++++ 5 files changed, 71 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 292bfa9..2c4079e 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ fonts by calling `bdftopsf` utility. Original inctruction: https://fedoraproject.org/wiki/BitmapFontConversion -16x8 font can be installed in Linux console. +8x8, 14x8, 16x8 font can be installed in Linux console. First, convert BDF to PSF (bdf2psf utility needed for this). -`make consolefonts` command will do conversion for you. +`make consolefonts` command will do the conversion for you. Then, copy psf fonts from build/consolefonts to /usr/consolefonts or whereever your distribution keeps .psf/.psf.gz files. Finally use console-setup or similarly named service to configure @@ -43,4 +43,35 @@ There are several individual fonts in the family. They include: - **Salut Mono**, a fixed width (monospaced) font designed for terminals. They include several sizes and also bold and italic. -The monospaced font also include extended (1.4x width) and wide (double width) variant. \ No newline at end of file +The monospaced font also include extended (1.4x width) and wide (double width) variant. + +Font file name consists of: + +```` + salut-sans14y.bdf + | | | |||| |_|__ Filename extension + | | | ||||______ Option letters (zero or more) + | | | |||_______ Size (two digits) + | | |__|_________ Individual name (sans etc.) |_ Font name + |___|______________ Family name (always salut) | +```` + +Option letters include: +* y - Semiexpanded (about 1.2x wide) +* x - Extended (about 1.4x wide) +* w - Wide (2x wide) +* b - Bold +* i - Italic + +Monospace font size widths: +```` + height __________ width _________ + 4 6 7 8 11 12 16 + 8 08 08x 08w + 11 11 11w + 12 12 12w + 14 14 14y + 16 16 16w + 22 22 + +```` \ No newline at end of file diff --git a/mono/salut-mono11w.bdf b/mono/salut-mono11w.bdf index e2e87a8..1999c22 100644 --- a/mono/salut-mono11w.bdf +++ b/mono/salut-mono11w.bdf @@ -1,5 +1,5 @@ STARTFONT 2.1 -FONT -Vovanium-Salut Mono-Medium-R-UltraExpanded--11-110-72-72-C-110-ISO10646-1 +FONT -Vovanium-Salut Mono-Medium-R-Wide--11-110-72-72-C-110-ISO10646-1 SIZE 11 72 72 FONTBOUNDINGBOX 11 11 0 -2 STARTPROPERTIES 20 @@ -15,7 +15,7 @@ FOUNDRY "Vovanium" FAMILY_NAME "Salut Mono" WEIGHT_NAME "Medium" SLANT "R" -SETWIDTH_NAME "UltraExpanded" +SETWIDTH_NAME "Wide" ADD_STYLE_NAME "" CHARSET_REGISTRY "ISO10646" CHARSET_ENCODING "1" diff --git a/mono/salut-mono12w.bdf b/mono/salut-mono12w.bdf index 906afa0..9c9baf4 100644 --- a/mono/salut-mono12w.bdf +++ b/mono/salut-mono12w.bdf @@ -1,5 +1,5 @@ STARTFONT 2.1 -FONT -Vovanium-Salut Mono-Medium-R-UltraExpanded--12-120-72-72-C-120-ISO10646-1 +FONT -Vovanium-Salut Mono-Medium-R-Wide--12-120-72-72-C-120-ISO10646-1 SIZE 12 72 72 FONTBOUNDINGBOX 12 12 0 -2 STARTPROPERTIES 20 @@ -15,7 +15,7 @@ FOUNDRY "Vovanium" FAMILY_NAME "Salut Mono" WEIGHT_NAME "Medium" SLANT "R" -SETWIDTH_NAME "UltraExpanded" +SETWIDTH_NAME "Wide" ADD_STYLE_NAME "" CHARSET_REGISTRY "ISO10646" CHARSET_ENCODING "1" diff --git a/mono/salut-mono16w.bdf b/mono/salut-mono16w.bdf index 89e4977..de3bb33 100644 --- a/mono/salut-mono16w.bdf +++ b/mono/salut-mono16w.bdf @@ -1,5 +1,5 @@ STARTFONT 2.1 -FONT -Vovanium-Salut Mono-Medium-R-UltraExpanded--16-160-72-72-C-160-ISO10646-1 +FONT -Vovanium-Salut Mono-Medium-R-Wide--16-160-72-72-C-160-ISO10646-1 SIZE 16 72 72 FONTBOUNDINGBOX 16 16 0 -3 STARTPROPERTIES 19 @@ -17,7 +17,7 @@ CHARSET_REGISTRY "ISO10646" FAMILY_NAME "Salut Mono" FOUNDRY "Vovanium" RELATIVE_SETWIDTH 90 -SETWIDTH_NAME "UltraExpanded" +SETWIDTH_NAME "Wide" SLANT "R" WEIGHT_NAME "Medium" X_HEIGHT 7 diff --git a/tools/check-coverage.awk b/tools/check-coverage.awk index 1d3617e..cc4ab10 100755 --- a/tools/check-coverage.awk +++ b/tools/check-coverage.awk @@ -170,6 +170,22 @@ $1 == "PIXEL_SIZE" { pixelsize[fontno] = $2 } +$1 == "SLANT" { + slant[fontno] = substr($2, 2, length($2) - 2); +} + +$1 == "WEIGHT_NAME" { + weight_name[fontno] = substr($2, 2, length($2) - 2); +} + +$1 == "SETWIDTH_NAME" { + setwidth_name[fontno] = substr($2, 2, length($2) - 2); +} + +$1 == "AVERAGE_WIDTH" { + average_width[fontno] = $2; +} + $1 == "STARTCHAR" { name = substr($0, 10) } @@ -226,6 +242,21 @@ END { col = nc } printf("\n") + printf(" "); + for(j = 1; j <= fontno; j += 1) { + printf(" %3d", pixelsize[j]); + } + printf("\n"); + printf(" "); + for(j = 1; j <= fontno; j += 1) { + printf(" %3d", average_width[j]/10); + } + printf("\n"); + printf(" "); + for(j = 1; j <= fontno; j += 1) { + printf(" %c%c%c", setwidth_name[j]"?", weight_name[j]"?", slant[j]"?"); + } + printf("\n"); printf(" Range "); for(j = 1; j <= fontno; j += 1) { printf(" %c", j + 96);