Commit Graph

4 Commits (22e4011cb67e3eca150f74e47695ebb859215598)

Author SHA1 Message Date
whitequark 94b26ddfac Add a built-in Bitstream Vera Sans Roman font.
Before this commit, the default font chosen for TTF text is Arial
(chosen by the basename of arial.ttf), which isn't present on most
Linux systems, and cannot be redistributed. After this commit, it is
replaced with Bitstream Vera Sans, which can be. Existing files
are not affected.

The font name in the TTF file was artificially modified to add
the (built-in) suffix, which will need to be done if more built-in
fonts are added.
2019-02-11 11:03:47 +00:00
whitequark 9c08398f51 Fix glyph for U+0454 є in vector font. 2016-05-20 21:42:49 +00:00
whitequark fc79642788 Move vector font to res/fonts/; remove lff2c.
This commit integrates the vector font in the resource system, so
that cross-compilation would be easier and a custom font could be
used without recompilation.

The font handling code was carefully written to lazily load glyphs;
as possible; in practice this means that startup is less than 15ms
slower after this commit, most of it spent in inflate().

This also reduces executable size and makes compilation of
glhelper.cpp much faster.
2016-05-18 11:24:24 +00:00
whitequark 645c2d90ac Move bitmap font to res/fonts/; remove unifont2c.
This commit integrates the bitmap font in the resource system, so
that cross-compilation would be easier.

The font handling code was carefully written to do glyph parsing
lazily; in practice this means that after this commit, startup
is less than 25ms slower, most of it spent in inflate().

This should also result in faster rendering, since there is no
rampant plane switching anymore; instead, all characters that are
actually used are stashed into same one texture.
2016-05-18 11:24:24 +00:00