mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Set the default value of useSystemFonts
correctly, depending on disableFontFace
, in the API (PR 13516 follow-up)
*Sorry about the churn here, since the change that I made in PR 13516 was not very smart.* With the current code, it's now *impossible* for a user to actually control the `useSystemFonts` option manually. To prevent outright breakage we obviously still need to default to setting `useSystemFonts = false` when `disableFontFace === true`, however that should be possible for an API consumer to override.
This commit is contained in:
parent
248efb16a7
commit
d9ed14a2f5
2 changed files with 18 additions and 17 deletions
|
@ -397,16 +397,14 @@ class PartialEvaluator {
|
|||
return new Stream(cachedData);
|
||||
}
|
||||
|
||||
if (!this.options.disableFontFace) {
|
||||
// The symbol fonts are not consistent across platforms, always load the
|
||||
// standard font data for them.
|
||||
if (
|
||||
this.options.useSystemFonts &&
|
||||
name !== "Symbol" &&
|
||||
name !== "ZapfDingbats"
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
// The symbol fonts are not consistent across platforms, always load the
|
||||
// standard font data for them.
|
||||
if (
|
||||
this.options.useSystemFonts &&
|
||||
name !== "Symbol" &&
|
||||
name !== "ZapfDingbats"
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const standardFontNameToFileName = getFontNameToFileMap(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue