From faf40df6f31e98eb752fd5e96330221c8f7dbcc7 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 12:10:40 -0300 Subject: sketchbook: text in six faces of the Go family, all bundled (f.textIn, host.textSizeIn, sk.Face) --- src/sketch/web.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sketch/web.zig') diff --git a/src/sketch/web.zig b/src/sketch/web.zig index 4445e8d..db9d9a8 100644 --- a/src/sketch/web.zig +++ b/src/sketch/web.zig @@ -431,7 +431,7 @@ fn Driver(comptime App: type) type { return .{ js.imageWidth(@backingInt(img)), js.imageHeight(@backingInt(img)) }; } /// As host.js draws text: 8 px a character and a 16 px line at scale 1. - fn textSize(_: *anyopaque, scale: f32, bytes: []const u8) [2]f32 { + fn textSize(_: *anyopaque, scale: f32, bytes: []const u8, _: abi.Face) [2]f32 { const count = std.unicode.utf8CountCodepoints(bytes) catch bytes.len; return .{ @as(f32, @floatFromInt(count)) * 8 * scale, 16 * scale }; } -- cgit v1.3