1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Extend getNonStdFontMap for non-embedded versions of the ItcSymbol font (issue 11532)

Despite its name, the fonts in ItcSymbol-family are "regular" fonts and not Symbol ones. However, given that the font name contains the word "Symbol" we ended up picking the wrong code-path in the `Font.fallbackToSystemFont`-method.

*Please note:* While this patch ensures that the text becomes readable, by falling back a standard font, the rendering will obviously not be perfect. However, that's the PDF generators "fault" since non-embedded fonts cannot be guaranteed to render correctly in all environments.
This commit is contained in:
Jonas Jenwald 2021-08-31 22:37:09 +02:00
parent 07e233d08b
commit ba9f004097
3 changed files with 16 additions and 0 deletions

View file

@ -129,6 +129,12 @@ const getNonStdFontMap = getLookupTableFactory(function (t) {
t["ComicSansMS-Bold"] = "Comic Sans MS-Bold";
t["ComicSansMS-BoldItalic"] = "Comic Sans MS-BoldItalic";
t["ComicSansMS-Italic"] = "Comic Sans MS-Italic";
t["ItcSymbol-Bold"] = "Helvetica-Bold";
t["ItcSymbol-BoldItalic"] = "Helvetica-BoldOblique";
t["ItcSymbol-Book"] = "Helvetica";
t["ItcSymbol-BookItalic"] = "Helvetica-Oblique";
t["ItcSymbol-Medium"] = "Helvetica";
t["ItcSymbol-MediumItalic"] = "Helvetica-Oblique";
t.LucidaConsole = "Courier";
t["LucidaConsole-Bold"] = "Courier-Bold";
t["LucidaConsole-BoldItalic"] = "Courier-BoldOblique";