uts: new-font project. Use terminus Unicode fonts for console.
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…
Updated by Electric Monk 5 months ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
commit cbc8e155c29643fa0d62159c2d3dee078ed6cc91 Author: Toomas Soome <firstname.lastname@example.org> Date: 2019-02-12T21:11:45.000Z 10355 uts: new-font project. Use terminus Unicode fonts for console. Reviewed by: John Levon <email@example.com> Reviewed by: Gergő Doma <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>