mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Get any width (if one is present) in CFF parser
- in charstring specs at page 21 (section 4.2): "Also, it may appear in the charstring as the difference from nominalWidthX" so the number we've on the stack doesn't have to be positive. - currently this bug has probably no visible effect - but when the font is loaded to be used with XFA, then the rendering is incorrect.
This commit is contained in:
parent
2fc9f39436
commit
d394188835
1 changed files with 3 additions and 1 deletions
|
@ -640,7 +640,9 @@ const CFFParser = (function CFFParserClosure() {
|
|||
} else if (stackSize > 1) {
|
||||
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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue