Project

General

Profile

Feature #10355

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

Added by Toomas Soome 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2019-02-08
Due date:
% Done:

100%

Estimated time:
Difficulty:
Hard
Tags:

Description

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 fontClosed2019-03-27

Actions

History

#1

Updated by Toomas Soome 5 months ago

  • Description updated (diff)
#2

Updated by Electric Monk 5 months ago

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

git commit cbc8e155c29643fa0d62159c2d3dee078ed6cc91

commit  cbc8e155c29643fa0d62159c2d3dee078ed6cc91
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-12T21:11:45.000Z

    10355 uts: new-font project. Use terminus Unicode fonts for console.
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

#3

Updated by Peter Tribble 4 months ago

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

Also available in: Atom PDF