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

Merge pull request #16363 from calixteman/use_local_font

[api-minor] Use a local font or fallback on an embedded one (if it exists) for non-embedded fonts (bug 1766039)
This commit is contained in:
calixteman 2023-05-10 14:19:05 +02:00 committed by GitHub
commit 2d2f7b315e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 584 additions and 28 deletions

View file

@ -210,7 +210,12 @@ const defaultOptions = {
cMapUrl: {
/** @type {string} */
value:
typeof PDFJSDev === "undefined" ? "../external/bcmaps/" : "../web/cmaps/",
// eslint-disable-next-line no-nested-ternary
typeof PDFJSDev === "undefined"
? "../external/bcmaps/"
: PDFJSDev.test("MOZCENTRAL")
? "resource://pdf.js/web/cmaps/"
: "../web/cmaps/",
kind: OptionKind.API,
},
disableAutoFetch: {
@ -271,8 +276,11 @@ const defaultOptions = {
standardFontDataUrl: {
/** @type {string} */
value:
// eslint-disable-next-line no-nested-ternary
typeof PDFJSDev === "undefined"
? "../external/standard_fonts/"
: PDFJSDev.test("MOZCENTRAL")
? "resource://pdf.js/web/standard_fonts/"
: "../web/standard_fonts/",
kind: OptionKind.API,
},