Skip to content

Commit e32ecc4

Browse files
committed
Fixes CFF test and CFF int16 parsing
1 parent 93f9efd commit e32ecc4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/fonts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4500,7 +4500,7 @@ var CFFParser = (function CFFParserClosure() {
45004500
return parseFloatOperand(pos);
45014501
} else if (value === 28) {
45024502
value = dict[pos++];
4503-
value = (value << 8) | dict[pos++];
4503+
value = ((value << 24) | (dict[pos++] << 16)) >> 16;
45044504
return value;
45054505
} else if (value === 29) {
45064506
value = dict[pos++];

test/unit/font_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('font', function() {
4242
}
4343

4444
describe('CFFParser', function() {
45-
var parser = new CFFParser(fontData);
45+
var parser = new CFFParser(fontData, {});
4646
var cff = parser.parse();
4747

4848
it('parses header', function() {

0 commit comments

Comments
 (0)