diff options
| author | eunhhu <[email protected]> | 2026-09-27 08:44:42 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-27 08:44:42 +0100 |
| commit | 523b810d6a9c60342c7f5d74f36fe66f3f2057e9 (patch) | |
| tree | c716fb00013264fdbfe7a95dc3f4a43c50b01ecc /README.md | |
| parent | 65a208f7a88e0aeea0d9db4666fd171f59b2a1d2 (diff) | |
| download | vega-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 'README.md')
| -rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -32,6 +32,15 @@ curl -s 'localhost:8767/views/cards_list?from=0&count=20' 한 저장소는 한 번에 한 호스트가 연다(상태의 소유자는 하나다). +글자와 아이콘은 하나의 바이너리 형식(심볼 파일)으로 그린다. 폰트와 SVG는 빌드할 때 한 번만 해석한다 +([설계 002](docs/design/002-symbol-format.md)). + +```sh +build/vega-symbols build --font DejaVuSans.ttf --codes 0x20-0x7e --svg 0xE000=icon.svg -o ui.vsym +build/vega-symbols compare DejaVuSans.ttf ui.vsym --sizes 12,16,32 # FreeType과 픽셀 차이, 읽는 비용 +build/vega-symbols render ui.vsym 0xE000 48 icon.pgm +``` + ## 위치 | 층 | 역할 | 비유 | |
