Feature #10355


uts: new-font project. Use terminus Unicode fonts for console.

Added by Toomas Soome over 3 years ago. Updated over 3 years ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


With basic FB console in place, it is time to make more of it. The loader already is built to use unicode fonts and pass the loaded font down to kernel.

Now we will:

1. recognize and use the font module (fall back to built in 8x16 font if font was not passed by boot loader).
2. adapt the dboot/locore, gfx_private and tem with new font related data structures.
3. if VGA text mode is used, we upload default (CP437) glyphs from 8x16 (builtin or module) to VGA font.
4. remove old fonts and scripts.
5. use font.c shared with loader.

The current kernel has built in something like 3 fonts, all 8859-1, no mechanism to load custom font. It is clear that we can not build all possible fonts into the kernel, especially if it is unicode font.

Instead, we create one single built in font, 8x16 because of vga text mode, and we only include subset from it to keep the size small. This approach will make sure we have screen output possible.

Since loader will load the “best” font, we have made loader to pass the loaded (full) font down to the kernel as multiboot module, this patch will pick this module up and will use it — this way we have way to get custom font, and we share it by loader and kernel, and we have smooth, consistent console.

This patch still does not implement option to upload font to kernel from userland (it would be nice to have the feature for case the third party boot loader is used).

Also, in case of text mode, we use 8x16 font and vga text mode is using CP477; at this time we do not provide mechanism to switch the code page (it is really about uploading the mapping tables).

Testing done: I have been using all this stuff myself and been providing the demo images over last few years…

Related issues

Related to illumos gate - Bug #10600: SPARC console needs a different fontClosedPeter Tribble2019-03-27

Actions #1

Updated by Toomas Soome over 3 years ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk over 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit cbc8e155c29643fa0d62159c2d3dee078ed6cc91

commit  cbc8e155c29643fa0d62159c2d3dee078ed6cc91
Author: Toomas Soome <>
Date:   2019-02-12T21:11:45.000Z

    10355 uts: new-font project. Use terminus Unicode fonts for console.
    Reviewed by: John Levon <>
    Reviewed by: Gergő Doma <>
    Approved by: Dan McDonald <>

Actions #3

Updated by Peter Tribble over 3 years ago

  • Related to Bug #10600: SPARC console needs a different font added

Also available in: Atom PDF