[systemd-devel] [RFC 05/12] gfx: add sd-gfx library with unifont section
David Herrmann
dh.herrmann at gmail.com
Mon Dec 2 07:38:00 PST 2013
Hi
>> The binary file contains all glyphs in a compressed 1-bit-per-pixel format
>> for all 8x16 and 16x16 glyphs. It is linked directly into libsystemd-gfx
>> via the *.bin makefile target. Binary size is 2.1MB, but thanks to paging,
>> the kernel only loads required pages into memory. A ASCII-only screen thus
>> only needs 40k VIRT mem.
> Do we have quad-glyphs (16x32) for the ASCII part of this for hi-res screens?
>
> (also, if we use NFD we could reuse these for some of unicode[1], but
> that is less important)
>
> [1]http://blog.golang.org/normalization
See here:
+static void gfx_glyph_blend(gfx_glyph *g, unsigned int ppi, const
struct unifont_data *u) {
+ unsigned int i, j;
+ const uint8_t *src;
+ uint8_t *dst;
+
+ /*
+ * TODO: scale glyph according to @ppi
+ */
Idea is to simply scale the glyph by an integer (sth like max(1, ppi /
72)). This will result in a readable font-size on all screens. Note
that we don't care for hi-res fonts, we're not EFI-firmware..
Regarding NFD: I don't care for normalization. I don't do any
string-comparisons. We support combining characters in the
font-renderer just fine, so I don't think we ever need unicode
normalization.
Thanks
David
More information about the systemd-devel
mailing list