summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-24 12:57:00 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit19a93afb5958b6a6548e1112813d4aa687a8976f (patch)
tree6bd95165b922f41de2c52620357602a77425fbd6 /src
parent39c8dd6ad7e97a974c7a194ae212c1677e0c7029 (diff)
downloadpardes-19a93afb5958b6a6548e1112813d4aa687a8976f.tar.gz
pardes-19a93afb5958b6a6548e1112813d4aa687a8976f.zip
Track Maple Mono, so the ligature tests always run
The GUI's ligature tests shape `->` and `==` with Maple Mono NF, the only ligature font in assets/, but the font was ignored, so a checkout without a private copy skipped the tests or ran them without their Maple half, and passed. The font is SIL OFL 1.1, whose licence is already tracked beside it, so it is committed and the tests now fail when it is missing instead of quietly passing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig
index 9d785b96..98a203a6 100644
--- a/src/gui/gui.zig
+++ b/src/gui/gui.zig
@@ -165,7 +165,7 @@ test "FreeType and HarfBuzz allocate from the gui allocator and give it all back
try std.testing.expectEqual(@as(c_int, 0), c.ui_font_substitutes(font, c.ui_font_glyph(font, '-')));
// A font with ligatures runs the whole HarfBuzz pass.
- const bytes = filesystem.readFile(std.testing.allocator, "assets/MapleMono-NF-Regular.ttf") catch return;
+ const bytes = try filesystem.readFile(std.testing.allocator, "assets/MapleMono-NF-Regular.ttf");
defer std.testing.allocator.free(bytes);
const maple = c.ui_font_new(bytes.ptr, @intCast(bytes.len)) orelse return error.FontInit;
defer c.ui_font_free(maple);
@@ -6274,7 +6274,7 @@ fn textTestLine(comptime text: []const u8) [text.len]pardes.Cell {
}
test "a ligature draws across its cells, one slice each, and comes apart under the cursor" {
- const bytes = filesystem.readFile(std.testing.allocator, "assets/MapleMono-NF-Regular.ttf") catch return error.SkipZigTest;
+ const bytes = try filesystem.readFile(std.testing.allocator, "assets/MapleMono-NF-Regular.ttf");
defer std.testing.allocator.free(bytes);
const font = c.ui_font_new(bytes.ptr, @intCast(bytes.len)) orelse return error.FontInit;
defer c.ui_font_free(font);