flow/build.zig.zon
CJ van den Berg ae0f62c3bf
feat(gui): M3 - TrueType rasterizer with fontconfig font discovery
Replace the M2 stub rasterizer with a real font rasterizer:

- build.zig.zon: add TrueType as a lazy path dependency
- build.zig: swap stub_rasterizer_mod for truetype_rasterizer_mod; link
  fontconfig + libc on Linux; TrueType dep is lazy (falls back gracefully)
- src/gui/rasterizer/truetype.zig: andrewrk/TrueType rasterizer; loadFont
  uses fontconfig to locate the font file, derives cell dimensions from
  vertical metrics (ascent−descent) and 'M' advance width; render blits the
  A8 glyph bitmap into the caller-provided staging buffer with correct
  baseline placement (ascent_px + off_y) and double-wide support (+cell_w
  x-offset for kind=.right); arena allocator per render call
- src/gui/rasterizer/font_finder.zig: OS dispatcher (Linux only for now)
- src/gui/rasterizer/font_finder/linux.zig: fontconfig C API - FcFontMatch
  resolves a font name pattern to an absolute file path

Requires: libfontconfig-dev  (already present alongside libgl-dev etc.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 19:33:24 +02:00

69 lines
2.8 KiB
Zig

.{
.name = .flow,
.version = "0.7.2",
.minimum_zig_version = "0.15.2",
.fingerprint = 0x52c0d670590aa80f,
.dependencies = .{
.syntax = .{
.url = "git+https://github.com/neurocyte/flow-syntax?ref=master#56929f0c523b59153e17919be2cd09d8bef32cd0",
.hash = "flow_syntax-0.7.2-X8jOoeFTAQBeP2Tn08Tw1jsMdifLEDBgPLqPqNelAupy",
},
.flags = .{
.url = "git+https://github.com/neurocyte/flags?ref=main#984b27948da3e4e40a253f76c85b51ec1a9ada11",
.hash = "flags-0.10.0-a_9h3gB4AADAYn0XaZuUqH1jKRmy6dqvAIbomtTIF6V1",
},
.dizzy = .{
.url = "https://github.com/neurocyte/dizzy/archive/c9219d23daccd9aa226cfde754fea278cb516459.tar.gz",
.hash = "dizzy-1.0.0-q40X4YCRAAAGYO9QOZiYYSOwiiFlqZlecMuQcxPiBcXM",
},
.thespian = .{
.url = "git+https://github.com/neurocyte/thespian?ref=master#7da13f44e8462d1ac0cac87c6f00cc4fcb62b0f9",
.hash = "thespian-0.0.1-owFOjlgiBgC8w4XqkCOegxz5vMy6kNErcssWQWf2QHeE",
},
.themes = .{
.url = "https://github.com/neurocyte/flow-themes/releases/download/master-c6c7f18cfb2e3945cd0b71dab24271465074dbc3/flow-themes.tar.gz",
.hash = "N-V-__8AAOKzJACguNxU76WX9M7RIhOYGuLnlasJ1-GDdhqT",
},
.fuzzig = .{
.url = "https://github.com/fjebaker/fuzzig/archive/4251fe4230d38e721514394a485db62ee1667ff3.tar.gz",
.hash = "fuzzig-0.1.1-Ji0xivxIAQBD0g8O_NV_0foqoPf3elsg9Sc3pNfdVH4D",
},
.vaxis = .{
.url = "git+https://github.com/neurocyte/libvaxis?ref=main#1f6c7222f59607bff0ee8d7c6a0637a05bceffcd",
.hash = "vaxis-0.5.1-BWNV_CNLCQDmr-D_UzqGRAngktQt7hiGTRf1gyozwxcG",
},
.zeit = .{
.url = "git+https://github.com/rockorager/zeit?ref=zig-0.15#ed2ca60db118414bda2b12df2039e33bad3b0b88",
.hash = "zeit-0.6.0-5I6bk0J9AgCVa0nnyL0lNY9Xa9F68hHq-ZarhuXNV-Jb",
},
.win32 = .{
.url = "git+https://github.com/marlersoft/zigwin32?ref=main#5587b16fa040573846a6bf531301f6206d31a6bf",
.hash = "zigwin32-25.0.28-preview-AAAAAICM5AMResOGQnQ85mfe60TTOQeMtt7GRATUOKoP",
.lazy = true,
},
.wio = .{
.path = "../flow-deps/wio",
.lazy = true,
},
.sokol = .{
.path = "../flow-deps/sokol-zig",
.lazy = true,
},
.TrueType = .{
.path = "../flow-deps/TrueType",
.lazy = true,
},
.diffz = .{
.url = "git+https://github.com/ziglibs/diffz.git#fbdf690b87db6b1142bbce6d4906f90b09ce60bb",
.hash = "diffz-0.0.1-G2tlIezMAQBwGNGDs7Hn_N25dWSjEzgR_FAx9GFAvCuZ",
},
},
.paths = .{
"include",
"src",
"test",
"build.zig",
"build.zig.zon",
},
}