aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-27 08:44:42 +0100
committereunhhu <[email protected]>2026-09-27 08:44:42 +0100
commit523b810d6a9c60342c7f5d74f36fe66f3f2057e9 (patch)
treec716fb00013264fdbfe7a95dc3f4a43c50b01ecc /src/screen.c
parent65a208f7a88e0aeea0d9db4666fd171f59b2a1d2 (diff)
downloadvega-523b810d6a9c60342c7f5d74f36fe66f3f2057e9.tar.gz
vega-523b810d6a9c60342c7f5d74f36fe66f3f2057e9.zip
Draw glyphs and icons from one symbol format, by exact pixel area
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).
Diffstat (limited to 'src/screen.c')
0 files changed, 0 insertions, 0 deletions