NanoBillion/gallant

The 12x22 raster font we love, used by Sun Microsystems SPARC stations. With a ton of Unicode glyphs!

C

153

82 commits

updated Sep 17, 2026

See the code

README

Gallant Font

Gallant Sample Text

This is the Gallant font, as used by the Sun Microsystems SPARCstation console, extended with glyphs for many Unicode blocks. It is a raster font with a 22x12 pixel character cell, descent 5 and ascent 17.

The starting point was the gallant.hex file as found on FreeBSD 14, which contained 502 glyphs at the time. This project currently provides more than 4600 glyphs. Major additions:

  • Greek
  • Cyrillic
  • International Phonetic Association Extensions
  • Extended Latin characters
  • Zapf Dingbats
  • Tons of arrows
  • Tons of mathematical symbols
  • Letterlike symbols and enclosed alphanumerics
  • Pixel-perfect box drawing
  • Currency symbols
  • More punctuation
  • Just enough Katakana to say コンニチハ
  • Powerline glyphs in the Private Use Area at U+e0a0

I have tried hard to keep the look of the font for Greek and Cyrillic glyphs, but not for symbols like arrows and mathematical operators where it makes no sense. Please let me know where I messed up (I can only barely read and write Greek, and hardly any Cyrillic and no Japanese at all). I used the documents of The Unicode Standard, Version 16.0 as guidance. See Unicode.org for more on Unicode.

Unicode Support

In the following table's Status column, Complete means all glyphs are present, Partial means at least one glyph is present, TODO means none are present.

BlockNameStatus
U+0000 - U+007FBasic LatinComplete
U+0080 - U+00FFLatin-1 SupplementComplete
U+0100 - U+017FLatin Extended-AComplete
U+0180 - U+024FLatin Extended-BComplete
U+0250 - U+02AFIPA ExtensionsComplete
U+02B0 - U+02FFSpacing Modifier LettersComplete
U+0300 - U+036FCombining Diacritical MarksComplete
U+0370 - U+03FFGreek and CopticComplete
U+0400 - U+04FFCyrillicComplete
U+0500 - U+052FCyrillic SupplementComplete
U+0530 - U+1CFF...Many foreign alphabets...TODO
U+1D00 - U+1D7FPhonetic ExtensionsTODO
U+1D80 - U+1DBFPhonetic Extensions SupplementTODO
U+1DC0 - U+1DFFCombining Diacritical Marks SupplementTODO
U+1E00 - U+1EFFLatin Extended AdditionalComplete
U+1F00 - U+1FFFGreek ExtendedComplete
U+2000 - U+206FGeneral PunctuationComplete
U+2070 - U+209FSuperscripts and SubscriptsComplete
U+20A0 - U+20CFCurrency SymbolsComplete
U+20D0 - U+20FFCombining Diacritical Marks for SymbolsComplete
U+2100 - U+214FLetterlike SymbolsComplete
U+2150 - U+218FNumber FormsComplete
U+2190 - U+21FFArrowsComplete
U+2200 - U+22FFMathematical OperatorsComplete
U+2300 - U+23FFMiscellaneous TechnicalComplete
U+2400 - U+243FControl PicturesComplete
U+2440 - U+245FOptical Character RecognitionComplete
U+2460 - U+24FFEnclosed AlphanumericsComplete
U+2500 - U+257FBox DrawingComplete
U+2580 - U+259FBlock ElementsComplete
U+25A0 - U+25FFGeometric ShapesComplete
U+2600 - U+26FFMiscellaneous SymbolsPartial
U+2700 - U+27BFDingbatsComplete
U+27C0 - U+27EFMiscellaneous Mathematical Symbols-AComplete
U+27F0 - U+27FFSupplemental Arrows-AComplete
U+2800 - U+28FFBraille PatternsComplete
U+2900 - U+297FSupplemental Arrows-BComplete
U+2980 - U+29FFMiscellaneous Mathematical Symbols-AComplete
U+2A00 - U+2AFFSupplemental Mathematical OperatorsComplete
U+2B00 - U+2BFFMiscellaneous Symbols and ArrowsComplete
U+2C00 - U+2C5FGlagoliticTODO
U+2C60 - U+2C7FLatin Extended-CComplete
U+2C80 - U+30BF...Many foreign alphabets...TODO
U+30A0 - U+30FFKatakanaPartial
U+3100 - U+A6FF...Many foreign alphabets...TODO
U+A700 - U+A71FModifier Tone LettersTODO
U+A720 - U+A7FFLatin Extended-DTODO
U+A800 - U+AB2F...Many foreign alphabets...TODO
U+AB30 - U+AB6FLatin Extended-ETODO
U+AB70 - U+FAFF...Many foreign alphabets...TODO
U+FB00 - U+FB4FAlphabetic Presentation FormsPartial
U+FB50 - U+FFEF...Many foreign alphabets...TODO
U+FFF0 - U+FFFFSpecialsComplete

Codepoints >= U+10000 can be part of a BDF file, but cannot be used by core X11 since it internally restricts glyph encoding numbers to 16 bit. The X server then says BDF Error on line X: char 'U+10000' has encoding too large (65536). This limitation does not apply to Xft rendered fonts.

The FreeBSD vt(4) driver works fine with the full 32 bit codepoint range.

How does it look?

The Images directory contains white-on-black and black-on-white (suffixed -Inverted) PNG image files for the separate blocks and Markus Kuhn's UTF-8-demo.txt, licensed CC BY; no changes were made to the text before rendering it in Gallant.

How do I use this GNUmakefile?

If you just want to use one of the gallant.* font files, you don't need to build anything. See How do I load or use this font?

If you want to modify or add glyphs, edit gallant.src and then make. The GNUmakefile and C programs need a number of utilities, headers and libraries which you may need to install first. These are

ItemFreeBSD PortDebian Package
GNU makedevel/gmakemake
Python 3lang/python3python3-minimal
Python FontToolsprint/py-fonttoolspython3-fonttools
Header <uniname.h>devel/libunistringlibunistring-dev
Library unistringdevel/libunistringlibunistring-dev
Library uninameslisttextproc/libuninameslistlibuninameslist-dev
Header <png.h>graphics/pnglibpng-dev
Library pnggraphics/pnglibpng-dev
bdftopcfx11-fonts/bdftopcfxfonts-utils

To build the TrueType gallant.ttf and web formats (gallant.woff, gallant.woff2), you will need Python 3 and the fonttools library version >= 4.41.0. To build images with txttopng the PNG library is required.

How do I load or use this font?

As an X11 Raster Font, e.g. for Xterm(1)

Install the BDF file gallant.bdf or the PCF file gallant.pcf.gz where X11 looks for fonts. You can query the current font path with xset q | sed -n '/^Font/,/^ /p'. If you do not have write permission to any of the font directories, you may create your own under, say, $HOME/.fonts.

The following example uses $HOME/.fonts as the font directory and adds it to the font path. To make the font path addition permanent, you should add the xset lines to your $HOME/.xinitrc or equivalent X11 startup file (common candidates are .xsession and .xprofile).

mkdir -p $HOME/.fonts
cp gallant.bfd $HOME/.fonts
cd $HOME/.fonts
mkfontdir
xset fp+ $HOME/.fonts
xset fp rehash
xterm -fa '' -fn "-sun-gallant-medium-r-normal-*-22-*-*-*-*-80-*-*"

FreeBSD Console

vidcontrol -f /path/to/gallant.fnt

You may also drop the font files into directory /usr/share/vt/fonts and add allscreens_flags="-f gallant" to your /etc/rc.conf. This way all console terminals use the font after boot.

FreeBSD Loader

For the full Gallant boot experience, make the loader use 12x22.fnt.gz early:

  • Copy it to /boot/fonts/12x22.fnt.gz.
  • Add screen.font="12x22" (without .fnt.gz) to /boot/loader.conf.
  • Make sure that /boot/fonts/INDEX.fonts contains these lines, preferably after the 11x22.fnt: entries.
    12x22.fnt:en:Gallant BSD Console, size 22
    12x22.fnt:da:Gallant BSD-konsol, størrelse 22
    12x22.fnt:de:Gallant BSD Console, Größe 22
    
  • For even more Sun Microsystems reminiscence, switch to black on white. In /boot/loader.conf set teken.fg_color="0" and teken.bg_color="7".
  • To use the FreeBSD logo with inverted colors:
    • (FreeBSD 14.3 and earlier) edit /boot/lua/drawer.lua. Look for the assignment image = "/boot/images/freebsd-brand-rev.png" and replace it with image = "/boot/images/freebsd-brand.png".
    • (FreeBSD 15+) edit /boot/loader.conf, add this line splash="/boot/images/freebsd-brand.png".

Linux, NetBSD, OpenBSD Console

The Linux console uses PSF fonts. As of 2025 this format can only contain 256 or 512 glyphs.

The NetBSD console (wscons) is also restricted to 512 glyphs. It does not handle double width or combining characters.

OpenBSD's wscons was inherited from NetBSD, so similar restrictions apply.

The glyphs in this Gallant project would have to be severely reduced in number to fit. If someone wants to contribute a stripped down font in the appropriate format, I'm willing to add it to this project.

The TrueType gallant.ttf

Windows GDI rejected the generated gallant.ttf prior to this version as an "invalid font file." This was due to several strict validation rules enforced by the Windows font subsystem:

  1. Windows requires a scalable outline font; bitmap-only TrueType/OpenType containers are rejected.
  2. The cmap (character map) table must not map the reserved Unicode non-characters U+FFFE or U+FFFF.
  3. Standard GID 1 (.null) and GID 2 (nonmarkingreturn) must be empty control glyphs (0 contours).
  4. The OS/2 table must define non-zero values for subscript, superscript, and strikeout metrics.
  5. The OS/2 fsSelection field must have the REGULAR bit set (value 64) to match the style names.

This project now uses a Python script srctottf.py to create the font. It parses the gallant.src directly, traces each pixel as a vector block (with collinear run-length optimization to minimize contours), and applies the necessary TrueType tables and metrics so the font installs and loads natively on Windows, macOS, Linux, and the web (generating gallant.ttf, gallant.woff, and gallant.woff2).

The font family name is Gallant Raster Term, to

  1. disambiguate it from the artsy Galant Regular font,
  2. emphasize it is a raster font that shows blocky pixels at large sizes,
  3. is monospaced and perfect to use in terminals.

Once installed, you can use the TrueType version of Gallant under X11 with, e.g.

xterm -fa "Gallant Raster Term:size=15"

How can I use the gallant.woff and gallant.woff2 web fonts?

Have a look at gallant.html to see a SPARCstation boot. Examine the style element, it is pretty straightforward.

Who are you?

I'm an ex-Sun Microsystems software engineer who had a stint in the company shortly before Oracle took over (2008/2009). I was nowhere near the OpenBoot PROM files which contained the Gallant font. My first contact with SUN hardware was in the early 90's at university with the 3/60 and the SPARCstations. It was then and there that the Gallant font and the Trinitron CRT raster were burnt in my retina.

How did you edit the glyphs?

With a text editor (vim). I wrote the hextosrc utility which turns gallant.hex into a human readable file named gallant.src with one character cell per pixel, a row count from 22 down to 1 so I know where the baseline (06) is and each pixel row between | characters (12 or 24, space for pixel not set, full block for set). My srctohex utility converts in the opposite direction.

This is what the glyph for A looks like in gallant.src:

STARTCHAR U0041 LATIN CAPITAL LETTER A
22 |            |
21 |            |
20 |            |
19 |     ██     |
18 |     ██     |
17 |    █ ██    |
16 |    █ ██    |
15 |    █  █    |
14 |   █   ██   |
13 |   █   ██   |
12 |   █    █   |
11 |  ████████  |
10 |  █     ██  |
09 |  █      █  |
08 | █       ██ |
07 | █       ██ |
06 |███     ████|
05 |            |
04 |            |
03 |            |
02 |            |
01 |            |
ENDCHAR

The row numbers and Unicode names are ignored by srctohex, and inserted/restored by hextosrc. This allows to freely add and delete pixel rows without tedious row renumbering or knowing the Unicode name.

The utilities are complemented by hextobdf to generate gallant.bdf. From there, other tools can create additional font formats.

History

The oldest reference to the Gallant font I could find at first was in a Copyright notice in NetBSD's gallant12x22.h which reads:

/*
 * Copyright (c) 1992, 1993
 *     The Regents of the University of California.  All rights reserved.
 *
 * This code is derived from software contributed to the Computer Systems
 * Engineering Group at Lawrence Berkeley Laboratory and to the University
 * of California at Berkeley by Jef Poskanzer.
 * [...]
 * Derived from: @(#)gallant19.h	8.1 (Berkeley) 6/11/93
 */

In private conversation with the author, Jef said he guessed that the Gallant font was designed by someone at Sun Microsystems before it made its way to Berkeley.

Further research examining the Unix history site v6sh.org revealed a list of the 4.4BSD-Alpha src directory contents which contains an rcons directory with these files:

rwxrwxr-x  3/9      0 Jul 25 07:58 1992 usr/src/sys/sparc/rcons/
rwxrwxr-x  3/9      0 Jul 25 07:58 1992 usr/src/sys/sparc/rcons/tags symbolic link to /var/db/sys_tags
r--r--r--  3/9  46247 Jul 22 09:49 1992 usr/src/sys/sparc/rcons/gallant19.h
r--r--r--  3/9   9548 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/raster.h
r--r--r--  3/9  29785 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/raster_op.c
r--r--r--  3/9   6870 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/raster_text.c
r--r--r--  3/9   2840 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/rcons_font.c
r--r--r--  3/9   7756 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/rcons_kern.c
r--r--r--  3/9  15437 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/rcons_subr.c

Gallant's relevant C language header file is in History/rcons/gallant19.h.

The 4.3BSD src and src/sys tape archives do not contain gallant19.h, which makes it likely it was acquired between 4.3BSD and 4.4BSD.

After asking in the Usenet newsgroup comp.sys.sun.hardware—16 years after Sun was acquired by Oracle people do lurk there—some helpful soul reached out to me with links to the OpenBoot gallant font and a PDF titled From the Valley of Heart's Delight to the Silicon Valley: A Study of Stanford University's Role in the Transformation by Carolyn Tajnai which in Appendix A reveals as the designer of the Gallant font no one less than Stanford professor Vaughan Pratt, who also designed the iconic Sun logo.

Sun Microsystems Logo

In an article in comp.sys.sun.hardware (Oct 11 1995) Vaughan Pratt provides this anecdote how Gallant came to be:

[...] That big font in the PROM monitor, I did that in April 1982 too, started out doing it by hand on graph paper until I realized I'd finish a lot sooner if I wrote a font editor first (pretty trivial editor, involved about three hours work but it saved several days of messing with graph paper). I called the font Gallant because it sounded like a font name.

Remarks

Codepoints 0 through 31 contain glyphs of the VT100 line-drawing character set otherwise known as the DEC Special Character and Line Drawing Set. They were left unmodified to not change their intended use by applications that expect them there. Each of the special characters also has an "official" Unicode codepoint. Contemporary applications should never need to render them. This is the mapping:

SpecialOfficialName
U+0000U+25AEblack vertical rectangle
U+0001U+25C6black diamond
U+0002U+2592medium shade
U+0003U+2409symbol for horizontal tabulation
U+0004U+240Csymbol for form feed
U+0005U+240Dsymbol for carriage return
U+0006U+240Asymbol for line feed
U+0007U+00B0degree sign
U+0008U+00B1plus-minus sign
U+0009U+2424symbol for newline
U+000aU+240Bsymbol for vertical tabulation
U+000bU+2518box drawings light up and left
U+000cU+2510box drawings light down and left
U+000dU+250Cbox drawings light down and right
U+000eU+2514box drawings light up and right
U+000fU+253Cbox drawings light vertical and horizontal
U+0010U+23BAbox drawings scan 1
U+0011U+23BBbox drawings scan 3
U+0012U+2500box drawings light horizontal
U+0013U+23BCbox drawings scan 7
U+0014U+23BDbox drawings scan 9
U+0015U+251Cbox drawings light vertical and right
U+0016U+2524box drawings light vertical and left
U+0017U+2534box drawings light up and horizontal
U+0018U+252Cbox drawings light down and horizontal
U+0019U+2502box drawings light vertical
U+001aU+2264less-than or equal to
U+001bU+2265greater-than or equal to
U+001cU+03C0greek small letter pi
U+001dU+2260not equal to
U+001eU+00A3pound sign
U+001fU+00B7middle dot

TODO

  • Describe how to contribute.
  • Commit 12x22 for loader use to FreeBSD once code slush is over.

Contributors

NanoBillion

78 commits

adriel-tech

1 commits

NanoBillion/gallant

The 12x22 raster font we love, used by Sun Microsystems SPARC stations. With a ton of Unicode glyphs!

C

153

82 commits

updated Sep 17, 2026

See the code

README

Gallant Font

Gallant Sample Text

This is the Gallant font, as used by the Sun Microsystems SPARCstation console, extended with glyphs for many Unicode blocks. It is a raster font with a 22x12 pixel character cell, descent 5 and ascent 17.

The starting point was the gallant.hex file as found on FreeBSD 14, which contained 502 glyphs at the time. This project currently provides more than 4600 glyphs. Major additions:

  • Greek
  • Cyrillic
  • International Phonetic Association Extensions
  • Extended Latin characters
  • Zapf Dingbats
  • Tons of arrows
  • Tons of mathematical symbols
  • Letterlike symbols and enclosed alphanumerics
  • Pixel-perfect box drawing
  • Currency symbols
  • More punctuation
  • Just enough Katakana to say コンニチハ
  • Powerline glyphs in the Private Use Area at U+e0a0

I have tried hard to keep the look of the font for Greek and Cyrillic glyphs, but not for symbols like arrows and mathematical operators where it makes no sense. Please let me know where I messed up (I can only barely read and write Greek, and hardly any Cyrillic and no Japanese at all). I used the documents of The Unicode Standard, Version 16.0 as guidance. See Unicode.org for more on Unicode.

Unicode Support

In the following table's Status column, Complete means all glyphs are present, Partial means at least one glyph is present, TODO means none are present.

BlockNameStatus
U+0000 - U+007FBasic LatinComplete
U+0080 - U+00FFLatin-1 SupplementComplete
U+0100 - U+017FLatin Extended-AComplete
U+0180 - U+024FLatin Extended-BComplete
U+0250 - U+02AFIPA ExtensionsComplete
U+02B0 - U+02FFSpacing Modifier LettersComplete
U+0300 - U+036FCombining Diacritical MarksComplete
U+0370 - U+03FFGreek and CopticComplete
U+0400 - U+04FFCyrillicComplete
U+0500 - U+052FCyrillic SupplementComplete
U+0530 - U+1CFF...Many foreign alphabets...TODO
U+1D00 - U+1D7FPhonetic ExtensionsTODO
U+1D80 - U+1DBFPhonetic Extensions SupplementTODO
U+1DC0 - U+1DFFCombining Diacritical Marks SupplementTODO
U+1E00 - U+1EFFLatin Extended AdditionalComplete
U+1F00 - U+1FFFGreek ExtendedComplete
U+2000 - U+206FGeneral PunctuationComplete
U+2070 - U+209FSuperscripts and SubscriptsComplete
U+20A0 - U+20CFCurrency SymbolsComplete
U+20D0 - U+20FFCombining Diacritical Marks for SymbolsComplete
U+2100 - U+214FLetterlike SymbolsComplete
U+2150 - U+218FNumber FormsComplete
U+2190 - U+21FFArrowsComplete
U+2200 - U+22FFMathematical OperatorsComplete
U+2300 - U+23FFMiscellaneous TechnicalComplete
U+2400 - U+243FControl PicturesComplete
U+2440 - U+245FOptical Character RecognitionComplete
U+2460 - U+24FFEnclosed AlphanumericsComplete
U+2500 - U+257FBox DrawingComplete
U+2580 - U+259FBlock ElementsComplete
U+25A0 - U+25FFGeometric ShapesComplete
U+2600 - U+26FFMiscellaneous SymbolsPartial
U+2700 - U+27BFDingbatsComplete
U+27C0 - U+27EFMiscellaneous Mathematical Symbols-AComplete
U+27F0 - U+27FFSupplemental Arrows-AComplete
U+2800 - U+28FFBraille PatternsComplete
U+2900 - U+297FSupplemental Arrows-BComplete
U+2980 - U+29FFMiscellaneous Mathematical Symbols-AComplete
U+2A00 - U+2AFFSupplemental Mathematical OperatorsComplete
U+2B00 - U+2BFFMiscellaneous Symbols and ArrowsComplete
U+2C00 - U+2C5FGlagoliticTODO
U+2C60 - U+2C7FLatin Extended-CComplete
U+2C80 - U+30BF...Many foreign alphabets...TODO
U+30A0 - U+30FFKatakanaPartial
U+3100 - U+A6FF...Many foreign alphabets...TODO
U+A700 - U+A71FModifier Tone LettersTODO
U+A720 - U+A7FFLatin Extended-DTODO
U+A800 - U+AB2F...Many foreign alphabets...TODO
U+AB30 - U+AB6FLatin Extended-ETODO
U+AB70 - U+FAFF...Many foreign alphabets...TODO
U+FB00 - U+FB4FAlphabetic Presentation FormsPartial
U+FB50 - U+FFEF...Many foreign alphabets...TODO
U+FFF0 - U+FFFFSpecialsComplete

Codepoints >= U+10000 can be part of a BDF file, but cannot be used by core X11 since it internally restricts glyph encoding numbers to 16 bit. The X server then says BDF Error on line X: char 'U+10000' has encoding too large (65536). This limitation does not apply to Xft rendered fonts.

The FreeBSD vt(4) driver works fine with the full 32 bit codepoint range.

How does it look?

The Images directory contains white-on-black and black-on-white (suffixed -Inverted) PNG image files for the separate blocks and Markus Kuhn's UTF-8-demo.txt, licensed CC BY; no changes were made to the text before rendering it in Gallant.

How do I use this GNUmakefile?

If you just want to use one of the gallant.* font files, you don't need to build anything. See How do I load or use this font?

If you want to modify or add glyphs, edit gallant.src and then make. The GNUmakefile and C programs need a number of utilities, headers and libraries which you may need to install first. These are

ItemFreeBSD PortDebian Package
GNU makedevel/gmakemake
Python 3lang/python3python3-minimal
Python FontToolsprint/py-fonttoolspython3-fonttools
Header <uniname.h>devel/libunistringlibunistring-dev
Library unistringdevel/libunistringlibunistring-dev
Library uninameslisttextproc/libuninameslistlibuninameslist-dev
Header <png.h>graphics/pnglibpng-dev
Library pnggraphics/pnglibpng-dev
bdftopcfx11-fonts/bdftopcfxfonts-utils

To build the TrueType gallant.ttf and web formats (gallant.woff, gallant.woff2), you will need Python 3 and the fonttools library version >= 4.41.0. To build images with txttopng the PNG library is required.

How do I load or use this font?

As an X11 Raster Font, e.g. for Xterm(1)

Install the BDF file gallant.bdf or the PCF file gallant.pcf.gz where X11 looks for fonts. You can query the current font path with xset q | sed -n '/^Font/,/^ /p'. If you do not have write permission to any of the font directories, you may create your own under, say, $HOME/.fonts.

The following example uses $HOME/.fonts as the font directory and adds it to the font path. To make the font path addition permanent, you should add the xset lines to your $HOME/.xinitrc or equivalent X11 startup file (common candidates are .xsession and .xprofile).

mkdir -p $HOME/.fonts
cp gallant.bfd $HOME/.fonts
cd $HOME/.fonts
mkfontdir
xset fp+ $HOME/.fonts
xset fp rehash
xterm -fa '' -fn "-sun-gallant-medium-r-normal-*-22-*-*-*-*-80-*-*"

FreeBSD Console

vidcontrol -f /path/to/gallant.fnt

You may also drop the font files into directory /usr/share/vt/fonts and add allscreens_flags="-f gallant" to your /etc/rc.conf. This way all console terminals use the font after boot.

FreeBSD Loader

For the full Gallant boot experience, make the loader use 12x22.fnt.gz early:

  • Copy it to /boot/fonts/12x22.fnt.gz.
  • Add screen.font="12x22" (without .fnt.gz) to /boot/loader.conf.
  • Make sure that /boot/fonts/INDEX.fonts contains these lines, preferably after the 11x22.fnt: entries.
    12x22.fnt:en:Gallant BSD Console, size 22
    12x22.fnt:da:Gallant BSD-konsol, størrelse 22
    12x22.fnt:de:Gallant BSD Console, Größe 22
    
  • For even more Sun Microsystems reminiscence, switch to black on white. In /boot/loader.conf set teken.fg_color="0" and teken.bg_color="7".
  • To use the FreeBSD logo with inverted colors:
    • (FreeBSD 14.3 and earlier) edit /boot/lua/drawer.lua. Look for the assignment image = "/boot/images/freebsd-brand-rev.png" and replace it with image = "/boot/images/freebsd-brand.png".
    • (FreeBSD 15+) edit /boot/loader.conf, add this line splash="/boot/images/freebsd-brand.png".

Linux, NetBSD, OpenBSD Console

The Linux console uses PSF fonts. As of 2025 this format can only contain 256 or 512 glyphs.

The NetBSD console (wscons) is also restricted to 512 glyphs. It does not handle double width or combining characters.

OpenBSD's wscons was inherited from NetBSD, so similar restrictions apply.

The glyphs in this Gallant project would have to be severely reduced in number to fit. If someone wants to contribute a stripped down font in the appropriate format, I'm willing to add it to this project.

The TrueType gallant.ttf

Windows GDI rejected the generated gallant.ttf prior to this version as an "invalid font file." This was due to several strict validation rules enforced by the Windows font subsystem:

  1. Windows requires a scalable outline font; bitmap-only TrueType/OpenType containers are rejected.
  2. The cmap (character map) table must not map the reserved Unicode non-characters U+FFFE or U+FFFF.
  3. Standard GID 1 (.null) and GID 2 (nonmarkingreturn) must be empty control glyphs (0 contours).
  4. The OS/2 table must define non-zero values for subscript, superscript, and strikeout metrics.
  5. The OS/2 fsSelection field must have the REGULAR bit set (value 64) to match the style names.

This project now uses a Python script srctottf.py to create the font. It parses the gallant.src directly, traces each pixel as a vector block (with collinear run-length optimization to minimize contours), and applies the necessary TrueType tables and metrics so the font installs and loads natively on Windows, macOS, Linux, and the web (generating gallant.ttf, gallant.woff, and gallant.woff2).

The font family name is Gallant Raster Term, to

  1. disambiguate it from the artsy Galant Regular font,
  2. emphasize it is a raster font that shows blocky pixels at large sizes,
  3. is monospaced and perfect to use in terminals.

Once installed, you can use the TrueType version of Gallant under X11 with, e.g.

xterm -fa "Gallant Raster Term:size=15"

How can I use the gallant.woff and gallant.woff2 web fonts?

Have a look at gallant.html to see a SPARCstation boot. Examine the style element, it is pretty straightforward.

Who are you?

I'm an ex-Sun Microsystems software engineer who had a stint in the company shortly before Oracle took over (2008/2009). I was nowhere near the OpenBoot PROM files which contained the Gallant font. My first contact with SUN hardware was in the early 90's at university with the 3/60 and the SPARCstations. It was then and there that the Gallant font and the Trinitron CRT raster were burnt in my retina.

How did you edit the glyphs?

With a text editor (vim). I wrote the hextosrc utility which turns gallant.hex into a human readable file named gallant.src with one character cell per pixel, a row count from 22 down to 1 so I know where the baseline (06) is and each pixel row between | characters (12 or 24, space for pixel not set, full block for set). My srctohex utility converts in the opposite direction.

This is what the glyph for A looks like in gallant.src:

STARTCHAR U0041 LATIN CAPITAL LETTER A
22 |            |
21 |            |
20 |            |
19 |     ██     |
18 |     ██     |
17 |    █ ██    |
16 |    █ ██    |
15 |    █  █    |
14 |   █   ██   |
13 |   █   ██   |
12 |   █    █   |
11 |  ████████  |
10 |  █     ██  |
09 |  █      █  |
08 | █       ██ |
07 | █       ██ |
06 |███     ████|
05 |            |
04 |            |
03 |            |
02 |            |
01 |            |
ENDCHAR

The row numbers and Unicode names are ignored by srctohex, and inserted/restored by hextosrc. This allows to freely add and delete pixel rows without tedious row renumbering or knowing the Unicode name.

The utilities are complemented by hextobdf to generate gallant.bdf. From there, other tools can create additional font formats.

History

The oldest reference to the Gallant font I could find at first was in a Copyright notice in NetBSD's gallant12x22.h which reads:

/*
 * Copyright (c) 1992, 1993
 *     The Regents of the University of California.  All rights reserved.
 *
 * This code is derived from software contributed to the Computer Systems
 * Engineering Group at Lawrence Berkeley Laboratory and to the University
 * of California at Berkeley by Jef Poskanzer.
 * [...]
 * Derived from: @(#)gallant19.h	8.1 (Berkeley) 6/11/93
 */

In private conversation with the author, Jef said he guessed that the Gallant font was designed by someone at Sun Microsystems before it made its way to Berkeley.

Further research examining the Unix history site v6sh.org revealed a list of the 4.4BSD-Alpha src directory contents which contains an rcons directory with these files:

rwxrwxr-x  3/9      0 Jul 25 07:58 1992 usr/src/sys/sparc/rcons/
rwxrwxr-x  3/9      0 Jul 25 07:58 1992 usr/src/sys/sparc/rcons/tags symbolic link to /var/db/sys_tags
r--r--r--  3/9  46247 Jul 22 09:49 1992 usr/src/sys/sparc/rcons/gallant19.h
r--r--r--  3/9   9548 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/raster.h
r--r--r--  3/9  29785 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/raster_op.c
r--r--r--  3/9   6870 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/raster_text.c
r--r--r--  3/9   2840 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/rcons_font.c
r--r--r--  3/9   7756 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/rcons_kern.c
r--r--r--  3/9  15437 Jul 22 09:50 1992 usr/src/sys/sparc/rcons/rcons_subr.c

Gallant's relevant C language header file is in History/rcons/gallant19.h.

The 4.3BSD src and src/sys tape archives do not contain gallant19.h, which makes it likely it was acquired between 4.3BSD and 4.4BSD.

After asking in the Usenet newsgroup comp.sys.sun.hardware—16 years after Sun was acquired by Oracle people do lurk there—some helpful soul reached out to me with links to the OpenBoot gallant font and a PDF titled From the Valley of Heart's Delight to the Silicon Valley: A Study of Stanford University's Role in the Transformation by Carolyn Tajnai which in Appendix A reveals as the designer of the Gallant font no one less than Stanford professor Vaughan Pratt, who also designed the iconic Sun logo.

Sun Microsystems Logo

In an article in comp.sys.sun.hardware (Oct 11 1995) Vaughan Pratt provides this anecdote how Gallant came to be:

[...] That big font in the PROM monitor, I did that in April 1982 too, started out doing it by hand on graph paper until I realized I'd finish a lot sooner if I wrote a font editor first (pretty trivial editor, involved about three hours work but it saved several days of messing with graph paper). I called the font Gallant because it sounded like a font name.

Remarks

Codepoints 0 through 31 contain glyphs of the VT100 line-drawing character set otherwise known as the DEC Special Character and Line Drawing Set. They were left unmodified to not change their intended use by applications that expect them there. Each of the special characters also has an "official" Unicode codepoint. Contemporary applications should never need to render them. This is the mapping:

SpecialOfficialName
U+0000U+25AEblack vertical rectangle
U+0001U+25C6black diamond
U+0002U+2592medium shade
U+0003U+2409symbol for horizontal tabulation
U+0004U+240Csymbol for form feed
U+0005U+240Dsymbol for carriage return
U+0006U+240Asymbol for line feed
U+0007U+00B0degree sign
U+0008U+00B1plus-minus sign
U+0009U+2424symbol for newline
U+000aU+240Bsymbol for vertical tabulation
U+000bU+2518box drawings light up and left
U+000cU+2510box drawings light down and left
U+000dU+250Cbox drawings light down and right
U+000eU+2514box drawings light up and right
U+000fU+253Cbox drawings light vertical and horizontal
U+0010U+23BAbox drawings scan 1
U+0011U+23BBbox drawings scan 3
U+0012U+2500box drawings light horizontal
U+0013U+23BCbox drawings scan 7
U+0014U+23BDbox drawings scan 9
U+0015U+251Cbox drawings light vertical and right
U+0016U+2524box drawings light vertical and left
U+0017U+2534box drawings light up and horizontal
U+0018U+252Cbox drawings light down and horizontal
U+0019U+2502box drawings light vertical
U+001aU+2264less-than or equal to
U+001bU+2265greater-than or equal to
U+001cU+03C0greek small letter pi
U+001dU+2260not equal to
U+001eU+00A3pound sign
U+001fU+00B7middle dot

TODO

  • Describe how to contribute.
  • Commit 12x22 for loader use to FreeBSD once code slush is over.

Contributors

NanoBillion

78 commits

adriel-tech

1 commits

Languages

C

84.7%

Python

8.3%

Makefile

5.7%

HTML

1.3%