1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

[GeckoView] Don't use the system fonts (bug 1882613)

On Android there's almost no chance we find a substitution font so
just use one of the font embedded in pdf.js.
This commit is contained in:
Calixte Denizet 2024-05-23 22:22:29 +02:00
parent 1c3195b86f
commit adb2bb5af8

View file

@ -1004,6 +1004,16 @@ const PDFViewerApplication = {
AppOptions.set("docBaseUrl", this.baseUrl);
}
// On Android, there is almost no chance to have the font we want so we
// don't use the system fonts in this case.
if (
typeof PDFJSDev === "undefined"
? window.isGECKOVIEW
: PDFJSDev.test("GECKOVIEW")
) {
args.useSystemFonts = false;
}
// Set the necessary API parameters, using all the available options.
const apiParams = AppOptions.getAll(OptionKind.API);
const loadingTask = getDocument({