Closed
Bug 1252420
Opened 9 years ago
Closed 8 years ago
Poor PDF font rendering with integrated Garamond
Categories
(Firefox :: PDF Viewer, defect, P3)
Tracking
()
RESOLVED
FIXED
Firefox 52
People
(Reporter: nalimilan, Unassigned)
References
Details
(Whiteboard: [pdfjs-c-rendering][pdfjs-d-font-conversion][pdfjs-f-fixed-upstream] https://github.com/mozilla/pdf.js/pull/7639)
In the following PDF, fonts are rendered very poorly with pdf.js:
http://federation.ens.fr/ydepot/actua/JOURNE/2006_11_14/BOU06VIV.pdf
On the other hand, on the same system, Evince (poppler) gives very good results. The file uses Garamond, and Evince says the font is integrated. Yet, pdf.js seems to use a different font instead.
This is on Fedora 23, Firefox 44.0.2.
Comment 1•9 years ago
|
||
We're apparently failing to convert the fonts correctly, leading to them being rejected by OTS (OpenType Sanitiser), which is what causes the font issues.
The following is displayed in the console (using the development version of PDF.js):
> PDF f2a006f72c98f57e71334f8b286e334a [1.2 Corel PDF Engine Version 9.398 / POP90] (PDF.js: 1.4.107 [WebGL]) viewer.js:7135:7
> downloadable font: CFF: Failed validating charstring set 0 (font-family: "g_d0_f1" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
> downloadable font: rejected by sanitizer (font-family: "g_d0_f1" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
> downloadable font: font load failed (font-family: "g_d0_f1" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
> Warning: Failed to load font ""g_d0_f1"": SyntaxError: An invalid or illegal string was specified pdf.js:368:5
> downloadable font: CFF: Failed validating charstring set 0 (font-family: "g_d0_f2" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
> downloadable font: rejected by sanitizer (font-family: "g_d0_f2" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
> downloadable font: font load failed (font-family: "g_d0_f2" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
> Warning: Failed to load font ""g_d0_f2"": SyntaxError: An invalid or illegal string was specified pdf.js:368:5
> Warning: Failed to load font ""g_d0_f3"": SyntaxError: An invalid or illegal string was specified pdf.js:368:5
> downloadable font: CFF: Failed validating charstring set 0 (font-family: "g_d0_f3" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
> downloadable font: rejected by sanitizer (font-family: "g_d0_f3" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
> downloadable font: font load failed (font-family: "g_d0_f3" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
> Warning: Failed to load font ""g_d0_f5"": SyntaxError: An invalid or illegal string was specified pdf.js:368:5
> downloadable font: CFF: Failed validating charstring set 0 (font-family: "g_d0_f5" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
> downloadable font: rejected by sanitizer (font-family: "g_d0_f5" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
> downloadable font: font load failed (font-family: "g_d0_f5" style:normal weight:normal stretch:normal src index:0) source: (invalid URI) <unknown>
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•9 years ago
|
Priority: -- → P3
Whiteboard: [pdfjs-c-rendering][pdfjs-d-font-conversion]
Updated•8 years ago
|
Whiteboard: [pdfjs-c-rendering][pdfjs-d-font-conversion] → [pdfjs-c-rendering][pdfjs-d-font-conversion][pdfjs-f-fixed-upstream] https://github.com/mozilla/pdf.js/pull/7639
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
You need to log in
before you can comment on or make changes to this bug.
Description
•