| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
src/ held two parts, the surfaces that show modules to people and the
symbol format with its CPU and GPU drawing. As in Pure (design 009), top
level directories are now the parts, and the README says what each builds.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
Symbol files (VEGASYM1) hold glyphs and icons as quadratic curves, verified
once per symbol and then read in place. vega-symbols builds them from fonts
(through FreeType, losslessly: twice the font's units keeps TrueType's
implied points whole) and from solid SVG paths (arcs included), refusing by
name what an icon asks for that symbols cannot hold.
The reference rasterizer computes each pixel's covered area exactly: every
curve's integral of clamp(1 - x) dy inside the pixel, split where it crosses
the pixel's sides. The Slug-style two-ray average first tried missed FreeType
by 15.4 levels on average at 12 px; exact area is within 1.2-3.5 at 8-16 px,
and where it differs most it matches 64x64 supersampling, not FreeType.
Reaching an outline costs 4.6-29x less than through FreeType, but the files
are 2.1-6.6x larger than glyf or CFF: design 002 has the numbers and the next
question (points shared along contours, lines without control points).
|