mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-29 15:47:57 +02:00
[api-minor] Use a local font or fallback on an embedded one (if it exists) for non-embedded fonts (bug 1766039)
- Replace FoxitSans with LiberationSans: LiberationSans is already there (for XFA) and we can use it as a good replacement of FoxitSans. - For now we just try to substitue standard fonts, the strategy is the following: * we try to find a font locally from a hardcoded list; * if it fails then we use Liberation as fallback (only for Helvetica for the moment); * else we just fallback on the system serif/sansserif/monospace font.
This commit is contained in:
parent
a24e11a91c
commit
53134c0c0b
12 changed files with 584 additions and 28 deletions
|
@ -98,6 +98,7 @@ const EXPORT_DATA_PROPERTIES = [
|
|||
"name",
|
||||
"remeasure",
|
||||
"subtype",
|
||||
"systemFontInfo",
|
||||
"type",
|
||||
"vertical",
|
||||
];
|
||||
|
@ -998,6 +999,7 @@ class Font {
|
|||
this.fallbackName = "sans-serif";
|
||||
}
|
||||
|
||||
this.systemFontInfo = properties.systemFontInfo;
|
||||
this.differences = properties.differences;
|
||||
this.widths = properties.widths;
|
||||
this.defaultWidth = properties.defaultWidth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue