A Zig library that finds fonts as fontconfig does, without it: the same configuration, OpenType and bitmap fonts, and the same answers.

Decode only the CFF glyphs a scan asks about

A charset leaves out a control character whose glyph has no contours, which takes a look at a few glyphs. Parsing the CFF table to find out ran every glyph's charstring, which was half of a full rebuild. zig-font 36b601d can parse the table without its glyphs and decode one on request, so only those few are run now. That release of zig-font also brings zig-brotli for WOFF 2.0, which build.zig.zon.nix now fetches. A full rebuild of 5,883 font files goes from 3.3 s to 1.7 s in ReleaseSafe and from 22 s to 12 s in Debug, with identical output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XxMfD5H5cp867D4Rdkx6Di


Author
Co-author Claude Opus 5.5 Date Commit Parent 65f2b097
+16 -8
3 changed files
+16 -8
3 changed files