<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sketchbook.git/vendor/fonts/README.md, branch main</title>
<subtitle>A small Zig platform for sketching games and toys</subtitle>
<id>https://git.0x4200.cafe/sketchbook.git/atom?h=main</id>
<link rel='self' href='https://git.0x4200.cafe/sketchbook.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/sketchbook.git/'/>
<updated>2026-11-17T15:15:01Z</updated>
<entry>
<title>text: FreeType and HarfBuzz in the build, Pango, Cairo and glib out, glyphs from one atlas</title>
<updated>2026-11-17T15:15:01Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-17T07:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/sketchbook.git/commit/?id=1f9fa4fc66c68e66e7653498f04d17052833d6c3'/>
<id>urn:sha1:1f9fa4fc66c68e66e7653498f04d17052833d6c3</id>
<content type='text'>
build.zig.zon gains the freetype and harfbuzz packages pardes pins (lazy:
a gpu-only embedder brings its own), and build.zig compiles them, with the
flags pardes's window uses, together with pardes's vendor/font.c
(unchanged) and a new vendor/text.c into one static library,
sketchbook-text, which the host links. vendor/text.c replaces the Pango
shim: the ten bundled faces by #embed, opened on first use by FreeType
(font.c) and by HarfBuzz's own OpenType functions over the same bytes;
sk_text_shape shapes a run left to right at a pixel size, each advance
rounded to a whole pixel, with the line box font.c's cell metrics give;
a codepoint the face lacks comes from one fallback face (ponytail: no
fontconfig, no bidi); sk_text_font takes a sketch's own font from bytes.

src/host/Glyphs.zig is the renderer: a text command is shaped at its
canvas size, each glyph rastered by font.c's ui_font_raster at its device
size and kept, trimmed to its ink (Atlas.inkBounds), in shelves of one
2048x2048 atlas, white premultiplied by coverage, cleared and refilled
when full. Consecutive text commands are one SDL_RenderGeometry call;
upright text lands on whole device pixels, NEAREST; textScaled (and a
glyph past 512 device pixels) is unsnapped, LINEAR. The SDL debug font
fallback off Linux goes: the faces are built in everywhere.
Host.textSize measures with the same call. test/fonts.c (a Pango
specimen outside the build) goes.

Measured: a cold Debug build of the host 39.8 s before, 43.7 s after;
the Debug host 117.7 MB (35.6 MB stripped) before, 159.5 MB (46.8 MB)
after, with 6 shared libraries where it loaded 41 (pango, cairo, glib,
fontconfig, the system freetype and harfbuzz and theirs). A frame of
4500 glyphs, half changing every frame (ReleaseFast, headless): 27.5 M
instructions and 2.80 ms of CPU before, 5.33 M and 0.40 ms after; all
static: 6.44 M and 0.47 ms before, 5.28 M and 0.42 ms after.

zig build test: 192/192 steps, 146/146 tests; test/text.script's pinned
pixels hold.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
</content>
</entry>
<entry>
<title>host: add optional Tracy profiling and reduce upload allocation stalls</title>
<updated>2026-11-13T18:07:42Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-13T18:07:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/sketchbook.git/commit/?id=d3074636fff0fbcd5fd9b71c0c3b1c1f5c0c1285'/>
<id>urn:sha1:d3074636fff0fbcd5fd9b71c0c3b1c1f5c0c1285</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sketchbook: JetBrains Mono NL (no ligatures) for the code faces, and its medium weight (.code_medium)</title>
<updated>2026-11-12T16:22:02Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T17:38:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/sketchbook.git/commit/?id=7dd447b7c8a21187af4fabade2111a0016e4b3a3'/>
<id>urn:sha1:7dd447b7c8a21187af4fabade2111a0016e4b3a3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sketchbook: JetBrains Mono bundled as three more faces (.code, .code_bold, .code_italic), for programs</title>
<updated>2026-11-12T16:22:02Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T17:18:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/sketchbook.git/commit/?id=534e82b5617f584f7165c52d3025d7d584d90349'/>
<id>urn:sha1:534e82b5617f584f7165c52d3025d7d584d90349</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sketchbook: text in six faces of the Go family, all bundled (f.textIn, host.textSizeIn, sk.Face)</title>
<updated>2026-11-12T16:22:02Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T15:10:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/sketchbook.git/commit/?id=faf40df6f31e98eb752fd5e96330221c8f7dbcc7'/>
<id>urn:sha1:faf40df6f31e98eb752fd5e96330221c8f7dbcc7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sketchbook: anim, manim-style scenes as a module (from the game's vecanim), with objects a scene draws itself</title>
<updated>2026-11-12T16:22:02Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T14:27:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/sketchbook.git/commit/?id=71e534631bf68f33f802d64794340870374b9f69'/>
<id>urn:sha1:71e534631bf68f33f802d64794340870374b9f69</id>
<content type='text'>
The player takes its canvas from the room it has and fits the scene's
frame into it, plays through and quits when exported, and draws vector
objects in runs around custom ones. The renderers' resvg comparison and
the timings come along as `zig build diff` and `zig build bench`; the
comparison's reference is padded to whole blocks rather than squeezed,
which had put Typst text over the limit.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>sketchbook: Zig 0.17, a Store on disk, requests, a scope (waveform, spectrum, spectrogram), audio codecs and fonts, web host</title>
<updated>2026-11-12T16:22:02Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-10-29T00:07:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/sketchbook.git/commit/?id=590ba7b9b579b97e34b51ab7e3460ebc85713343'/>
<id>urn:sha1:590ba7b9b579b97e34b51ab7e3460ebc85713343</id>
<content type='text'>
</content>
</entry>
</feed>
