diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 12:10:40 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-12 13:22:02 -0300 |
| commit | faf40df6f31e98eb752fd5e96330221c8f7dbcc7 (patch) | |
| tree | ab9356732afbbbb18e85f973945249a738863ae7 /src/sketch/web.zig | |
| parent | 71e534631bf68f33f802d64794340870374b9f69 (diff) | |
| download | sketchbook-faf40df6f31e98eb752fd5e96330221c8f7dbcc7.tar.gz sketchbook-faf40df6f31e98eb752fd5e96330221c8f7dbcc7.zip | |
sketchbook: text in six faces of the Go family, all bundled (f.textIn, host.textSizeIn, sk.Face)
Diffstat (limited to 'src/sketch/web.zig')
| -rw-r--r-- | src/sketch/web.zig | 2 |
1 files changed, 1 insertions, 1 deletions
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 }; } |
