Skip to content

Commit

Permalink
Added test for gasp table writing
Browse files Browse the repository at this point in the history
  • Loading branch information
Balearica committed Jul 9, 2024
1 parent c39aa15 commit a2c5999
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/tables/gasp.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ describe('tables/gasp.mjs', function () {
assert.equal(font.tables.gasp.gaspRanges[1].rangeGaspBehavior, 0x0001 + 0x0002 + 0x0004 + 0x0008); // all flags set = 15
});

it('can write tables that are read as identical to the original', function() {
const font2 = parse(font.toArrayBuffer());
assert.strictEqual(JSON.stringify(font.tables.gasp), JSON.stringify(font2.tables.gasp));
});

});

0 comments on commit a2c5999

Please sign in to comment.