Skip to content

Commit ffecc36

Browse files
authored
test: update font in text spec (#1108)
1 parent 3d46d37 commit ffecc36

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
-3.16 KB
Loading

__test__/text.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { join } from 'path'
1+
import { join } from 'node:path'
22

33
import ava, { TestFn } from 'ava'
44

5-
import { GlobalFonts, createCanvas, Canvas, SKRSContext2D } from '../index'
5+
import { GlobalFonts, createCanvas, Canvas, SKRSContext2D, type CanvasTextAlign } from '../index'
66
import { snapshotImage } from './image-snapshot'
77

88
const test = ava as TestFn<{
@@ -172,9 +172,9 @@ test('text-align-with-space', async (t) => {
172172
ctx.moveTo(100, 0)
173173
ctx.lineTo(100, 512)
174174
ctx.stroke()
175-
ctx.font = '48px sans-serif, PingFang HK'
175+
ctx.font = '38px Iosevka Slab'
176176
ctx.textAlign = 'center'
177-
ctx.fillText('蒙娜丽莎', 100, 50)
178-
ctx.fillText('兔 宝 宝', 100, 200)
177+
ctx.fillText('Mona Lisa', 100, 50)
178+
ctx.fillText('A B C', 100, 200)
179179
await snapshotImage(t)
180180
})

0 commit comments

Comments
 (0)