Commit Graph

2 Commits (bd6c4c0cbd27a35d21996f498bd4befcd085a0d1)

Author SHA1 Message Date
EvilSpirit bd6c4c0cbd Use 16-bit integers to store builtin vector font data.
This significantly increases font legibility, since curves are
represented more precisely. The file size is increased by mere ~1M
(from 7M).
2016-04-16 03:10:56 +00:00
EvilSpirit 57fb3bf3dc Replace internal vector font with LibreCAD's GPLv2+ vector font.
This font is less complete than our bitmap font, Unifont: Unifont
has essentially complete Unicode coverage and LibreCAD's font only
has Latin, Cyrillic and Japanese, but it can be extended rather
easily, so this should be fine for now.

These embedded fonts fatten glhelper.o quite a bit:
bitmapfont.table.h is about 8M in gzip-compressed bitmaps and
vectorfont.table.h is about 2M in raw vector data.
In spite of that it takes just around five seconds to build
glhelper.c on my laptop, so it should be fine.

The final executable grows from about 2M to about 8M, but this
is a small price to pay for fairly extensive i18n support.

The new font has somewhat different metrics, so the rendering
code has been fudged to make it look good.
2016-02-14 14:09:36 +00:00