Skip to content

Commit 93f9efd

Browse files
committed
Fixes ascent and descent values for windows gdi
1 parent 4550ffe commit 93f9efd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/fonts.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4420,6 +4420,13 @@ var CFFParser = (function CFFParserClosure() {
44204420
properties.unitsPerEm = 1 / fontMatrix[0];
44214421
}
44224422

4423+
var fontBBox = topDict.getByName('FontBBox');
4424+
if (fontBBox) {
4425+
// adjusting ascent/descent
4426+
properties.ascent = fontBBox[3];
4427+
properties.descent = fontBBox[1];
4428+
}
4429+
44234430
var charset, encoding;
44244431
if (cff.isCIDFont) {
44254432
var fdArrayIndex = this.parseIndex(topDict.getByName('FDArray')).obj;

0 commit comments

Comments
 (0)