From 534e82b5617f584f7165c52d3025d7d584d90349 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 14:18:36 -0300 Subject: sketchbook: JetBrains Mono bundled as three more faces (.code, .code_bold, .code_italic), for programs --- test/text.script | 4 ++++ test/text.zig | 3 +++ 2 files changed, 7 insertions(+) (limited to 'test') diff --git a/test/text.script b/test/text.script index c27df2a..82ce32c 100644 --- a/test/text.script +++ b/test/text.script @@ -15,3 +15,7 @@ expect-pixel .zig-cache/text/native.png 180 222 16 16 16 255 # of scale 3's 230), not the 120 that scale 1.5 would shape. expect-pixel .zig-cache/text/native.png 123 265 32 64 96 255 expect-pixel .zig-cache/text/native.png 127 256 16 16 16 255 +# JetBrains Mono (`.code`) advances as the mono faces do: eleven characters +# at scale 2 are 176 px, on its own taller line. +expect-pixel .zig-cache/text/native.png 184 275 32 64 96 255 +expect-pixel .zig-cache/text/native.png 190 290 16 16 16 255 diff --git a/test/text.zig b/test/text.zig index 74bbaed..1318d1f 100644 --- a/test/text.zig +++ b/test/text.zig @@ -16,6 +16,9 @@ const lines = [_]struct { scale: f32, text: []const u8, face: sk.Face = .mono, r // Rasterized at 3 and drawn at 1.5: half of what scale 3 covers (115 px // for ten digits), not what scale 1.5 would shape (120). .{ .scale = 1.5, .text = "0123456789", .raster = 3 }, + // JetBrains Mono, for code, advances as Go Mono does: ten columns + // at scale 2 are the 160 px of the bold line above. + .{ .scale = 2, .text = "rsp \u{2014}\u{25b8} 0x10", .face = .code }, }; pub fn draw(f: *sk.Frame) void { -- cgit v1.3