For non-embedded fonts, map softhyphen (0x00AD) to regular hyphen (0x002D) (issue 9084)
In the PDF file, the `ToUnicode` data first maps the hyphen correctly, and then *overwrites* it to point to the softhyphen instead. That one cannot be rendered in browsers, and an empty space thus appear instead. Fixes 9084.
This commit is contained in:
parent
92fcfce685
commit
83e8398ff2
@ -51,6 +51,8 @@ function mapSpecialUnicodeValues(code) {
|
||||
return 0;
|
||||
} else if (code >= 0xF600 && code <= 0xF8FF) {
|
||||
return (getSpecialPUASymbols()[code] || code);
|
||||
} else if (code === 0x00AD) { // softhyphen
|
||||
return 0x002D; // hyphen
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -62,6 +62,7 @@
|
||||
!issue8707.pdf
|
||||
!issue8798r.pdf
|
||||
!issue8823.pdf
|
||||
!issue9084.pdf
|
||||
!bad-PageLabels.pdf
|
||||
!filled-background.pdf
|
||||
!ArabicCIDTrueType.pdf
|
||||
|
BIN
test/pdfs/issue9084.pdf
Normal file
BIN
test/pdfs/issue9084.pdf
Normal file
Binary file not shown.
@ -711,6 +711,13 @@
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue9084",
|
||||
"file": "pdfs/issue9084.pdf",
|
||||
"md5": "5570ec01cc869d299fec1b2f68926a08",
|
||||
"rounds": 1,
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue8707",
|
||||
"file": "pdfs/issue8707.pdf",
|
||||
"md5": "d3dc670adde9ec9fb82c974027033029",
|
||||
|
Loading…
Reference in New Issue
Block a user