blob: 776cc41c0cc662d118449c8d831494fca4aba069 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# `textSize` is what `text` draws: at scale 1 ten digits of the built-in
# font advance about 80 px on a 16 px line, and the box under them is that.
screenshot .zig-cache/text/native.png
expect-pixel .zig-cache/text/native.png 84 11 32 64 96 255
expect-pixel .zig-cache/text/native.png 84 24 32 64 96 255
expect-pixel .zig-cache/text/native.png 97 11 16 16 16 255
expect-pixel .zig-cache/text/native.png 84 27 16 16 16 255
# Another face is another width: ten sans `i` at scale 2 advance 60 px
# where the mono (bold here, the line below) advances 160.
expect-pixel .zig-cache/text/native.png 66 198 32 64 96 255
expect-pixel .zig-cache/text/native.png 80 185 16 16 16 255
expect-pixel .zig-cache/text/native.png 168 236 32 64 96 255
expect-pixel .zig-cache/text/native.png 180 222 16 16 16 255
# Rasterized at scale 3 and drawn at 1.5, ten digits cover 115 px (half
# 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 NL (`.code_medium`) advances as the mono faces do, with no
# ligatures: twelve characters at scale 2 are 192 px, on its own taller line.
expect-pixel .zig-cache/text/native.png 200 275 32 64 96 255
expect-pixel .zig-cache/text/native.png 206 290 16 16 16 255
|