Skip to content

Commit 6301226

Browse files
committed
arimo test for master
1 parent c215e09 commit 6301226

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎test/canvas.test.js‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,14 @@ describe('Canvas', function () {
10071007
})
10081008

10091009
describe('Context2d#measureText()', function () {
1010+
before(function () {
1011+
registerFont(path.join(__dirname, '/fixtures/Arimo-Regular.ttf'), {family: 'Arimo'})
1012+
});
1013+
1014+
after(function () {
1015+
deregisterAllFonts()
1016+
});
1017+
10101018
it('Context2d#measureText().width', function () {
10111019
const canvas = createCanvas(20, 20)
10121020
const ctx = canvas.getContext('2d')
@@ -1019,7 +1027,7 @@ describe('Canvas', function () {
10191027
it('works', function () {
10201028
const canvas = createCanvas(20, 20)
10211029
const ctx = canvas.getContext('2d')
1022-
ctx.font = '20px Arial'
1030+
ctx.font = '20px Arimo'
10231031

10241032
ctx.textBaseline = 'alphabetic'
10251033
let metrics = ctx.measureText('Alphabet')

0 commit comments

Comments
 (0)