mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Always use standard font data, with disableFontFace
set in the API (PR 12726 follow-up)
We must force-fetch standard font data, when `disableFontFace = true` is set in the API, since otherwise rendering in e.g. the viewer is still broken (same as before PR 12726 landed). *Please note:* We still need to also load standard font data for patterns and/or some text-rendering modes, however that will require larger changes so I figured that it cannot hurt to submit *this* patch right now.
This commit is contained in:
parent
2a65455c71
commit
69477bfb06
1 changed files with 10 additions and 8 deletions
|
@ -397,14 +397,16 @@ class PartialEvaluator {
|
|||
return new Stream(cachedData);
|
||||
}
|
||||
|
||||
// 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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
const standardFontNameToFileName = getFontNameToFileMap(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue