8011 vtfontcvt and console bitmap font import

Review Request #423 — Created March 29, 2017 and submitted — Latest diff uploaded


8011 vtfontcvt and console bitmap font import

The basic intro is in issue description, so more about details now.

The basic problem with unicode font is the size - both in terms of the number of the glyphs provided and the capacity.

The size affects us in two ways, we need to have fast search for glyphs and we can not build all the supported fonts into the kernel nor into the boot loader. We actually do not build even one single whole font.

To address the search issue, the similar idea is used as with our current fonts, except the contiguous sequences are squashed and bi-search is used.

To avoid building whole fonts into the kernel and boot loader is mostly about two subtasks - first, we need to establish the minimal essential subset of glyphs, and secondly, we need to support loading the full fonts.

The reasonable "default built in" font for x86 platform is 8x16, and just because it also happens to be the default text mode font. For the selection of the chars - the loader needs basic ascii + box drawing for text mode; the kernel needs basic ascii + the upper half of the 8 bit code page to load the text mode font into the vga font memory. Moreover, since we have the memory management in loader, we can compress the built in font as we are already compressing the ficl softcore. Since the early kernel has really nothing, we can not use compression there.

The ported vtfontcvt is intended to either create binary font based on bdf source, or to create the variant of C source with built in font bitmap and the index of the glyphs.

In this update we do not address the font loading at all; except we need to install the binary fonts somewhere - I have picked the /boot/fonts directory for now, and thats because the more natural location - /usr/share/lib, is not really available on cases like install media and compressed miniroot systems.