aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-27 08:56:47 +0100
committereunhhu <[email protected]>2026-09-27 08:56:47 +0100
commit2acf27f665f8a926d244efa58f6ef2c92d65e8c4 (patch)
treebbe910b904b64876eab1b206226aad1fe7caf1ff /examples
parent523b810d6a9c60342c7f5d74f36fe66f3f2057e9 (diff)
downloadvega-2acf27f665f8a926d244efa58f6ef2c92d65e8c4.tar.gz
vega-2acf27f665f8a926d244efa58f6ef2c92d65e8c4.zip
Store symbol outlines as point chains, and keep glyph advances whole
Format 2 (VEGASYM2) writes each contour as a chain of 4-byte points, on or off the curve as in TrueType: endpoints are shared, lines have no control point, and two off points imply the on point between them. A curve is still had from one point and its two neighbours, so a GPU can point at curves by point index and upload the table as it is. Cubics (CFF, SVG curves and arcs) become quadratic splines the cu2qu way, joins left implied, within a unit. Files are about half of format 1: 1.3-1.4x a TrueType font's glyf (the whole subset font's size), 2.0-2.9x CFF, 2.6x smaller than the SVG icons. Opening checks each symbol's first and last point instead of every curve: 0.34 ms rather than 19 ms for 11,172 Hangul syllables. Points decode without branching on their flags (9.7 ns a point), still 1.2-10x cheaper than FreeType's outline. Glyph advances were half their width since outlines are doubled for FreeType's implied points; they now match hmtx, and the check says so.
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions