blob: 2ed0b29fd54b977bc6646639eb7fbfe21431fac5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# `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
# A paragraph (sk.text) wrapped at 200 and centred: three lines, the last
# with "twice" at twice the size, 16 + 16 + 31 px tall from y 175; the caret
# its Layout gives before "twice" is that line's height, at x 440.
expect-pixel .zig-cache/text/native.png 425 237 32 64 96 255
expect-pixel .zig-cache/text/native.png 425 238 16 16 16 255
expect-pixel .zig-cache/text/native.png 440 207 255 255 0 255
expect-pixel .zig-cache/text/native.png 440 237 255 255 0 255
expect-pixel .zig-cache/text/native.png 440 206 32 64 96 255
|