1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-18 14:18:23 +02:00

Merge pull request #19804 from Snuffleupagus/issue-19802

Use `adjustWidths` unconditionally for all embedded fonts (issue 19802)
This commit is contained in:
Jonas Jenwald 2025-04-11 16:53:20 +02:00 committed by GitHub
commit 53c5a53668
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 4 deletions

View file

@ -1108,9 +1108,10 @@ class Font {
// Repair the TrueType file. It is can be damaged in the point of
// view of the sanitizer
data = this.checkAndRepair(name, file, properties);
if (this.isOpenType) {
adjustWidths(properties);
adjustWidths(properties);
if (this.isOpenType) {
type = "OpenType";
}
break;
@ -2645,8 +2646,6 @@ class Font {
cffFile = new Stream(tables["CFF "].data);
cff = new CFFFont(cffFile, properties);
adjustWidths(properties);
return this.convert(name, cff, properties);
}

View file

@ -28,6 +28,7 @@
!checkbox-bad-appearance.pdf
!issue4684.pdf
!issue8092.pdf
!issue19802.pdf
!issue5256.pdf
!issue5801.pdf
!issue5946.pdf

BIN
test/pdfs/issue19802.pdf Normal file

Binary file not shown.

View file

@ -3871,6 +3871,13 @@
"annotations": true,
"about": "LinkAnnotation with a relative link, and a /Catalog Base-URI."
},
{
"id": "issue19802",
"file": "pdfs/issue19802.pdf",
"md5": "7a431fb7951ad605f676c80636bbe5d3",
"rounds": 1,
"type": "eq"
},
{
"id": "issue14824",
"file": "pdfs/issue14824.pdf",