mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-23 16:48:08 +02:00
Use adjustWidths
unconditionally for all embedded fonts (issue 19802)
Previously we'd only do this for Type1/CFF fonts, see e.g. PR 6736, since the font-program may update the /FontMatrix. However, it seems that we should do this unconditionally to account for fonts with non-default /FontMatrix-entries in the font-dictionary (which seem to be pretty rare).
This commit is contained in:
parent
539a81c7a3
commit
835a456767
4 changed files with 11 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue