Merge pull request #13389 from calixteman/width_in_cff

Get any width (if one is present) in CFF parser
This commit is contained in:
Brendan Dahl 2021-05-17 09:13:45 -07:00 committed by GitHub
commit 46c2eeb19a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -640,7 +640,9 @@ const CFFParser = (function CFFParserClosure() {
} else if (stackSize > 1) { } else if (stackSize > 1) {
warn("Found too many parameters for stack-clearing command"); warn("Found too many parameters for stack-clearing command");
} }
if (stackSize > 0 && stack[stackSize - 1] >= 0) { if (stackSize > 0) {
// Width can be any number since its the difference
// from nominalWidthX.
state.width = stack[stackSize - 1]; state.width = stack[stackSize - 1];
} }
} }