Closed Bug 1204903 Opened 9 years ago Closed 9 years ago

[PDF Viewer] Incorrect OS/2 font rendering (error: bad cap_height)

Categories

(Firefox :: PDF Viewer, defect, P2)

40 Branch
defect

Tracking

()

RESOLVED FIXED
Firefox 45

People

(Reporter: niklas, Unassigned)

References

Details

(Keywords: fonts, Whiteboard: [pdfjs-c-rendering][pdfjs-d-font-conversion][pdfjs-f-regression][pdfjs-f-fixed-upstream] https://github.com/mozilla/pdf.js/pull/6736)

Attachments

(3 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0 Build ID: 20150826023504 Steps to reproduce: This bug introduces itself when generating a PDF with [TCPDF](http://www.tcpdf.org) and using [Google's Roboto font](https://github.com/google/roboto/tree/558379729452a4409bc632bddd60e5b7f1fdba41) as the PDF font. Both Safari and Chrome shows these PDF:s just fine using their own engines. I am atttaching a screen shot comparing Safari 8.0.8 and Firefox 40.0.3. I am also attaching a compressed archive containing a testcase. Drop the testcase into your web server and visit the URL with Firefox. Actual results: Ugly/incorrect characters show. Expected results: Four english sentences should be visible in the PDF.
I tried attaching a complete zipped archive of the fonts, tcpdf, and the php script, but it hit the file size ceiling. You will have to assemble it again, sorry.
Component: Untriaged → PDF Viewer
Keywords: fonts
We don't need the php script to generate the PDF, but we need the resulting PDF. Please, attach the PDF file to the bug report.
Flags: needinfo?(niklas)
Attached file Generated PDF
Attachment #8661265 - Attachment is obsolete: true
Flags: needinfo?(niklas)
Console (FF40): PDF fee49ca4650e4d3496ca1f62806496f9 [1.4 TCPDF 6.2.12 (http://www.tcpdf.org) / -] (PDF.js: 1.1.114) viewer.js:6397:1 downloadable font: OS/2: bad cap_height: -21 (font-family: "g_font_4" style:normal weight:normal stretch:normal src index:0) source: data:font/opentype;base64,T1RUTwAJAIAAAwAQQ0ZG(...) downloadable font: OS/2: bad cap_height: -40 (font-family: "g_font_6" style:normal weight:normal stretch:normal src index:0) source: data:font/opentype;base64,T1RUTwAJAIAAAwAQQ0ZGI(...) No error message in FF43, the rendering is better but still broken.
Summary: Incorrect font rendering in PDF → [PDF Viewer] Incorrect OS/2 font rendering (error: bad cap_height)
Attached image ff25-screenshot.png
In the past, the rendering was almost normal, only bold/italics were missing, see my screenshot. Reg range: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5ceea82a79c7&tochange=a4c1961bf723 Ryan VanderMeulen — Bug 897554 - Update pdf.js to version 0.8.377. r=bdahl
Blocks: 897554
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Whiteboard: [pdfjs-c-rendering][pdfjs-d-font-conversion][pdfjs-f-regression]
I just want to drop by and say that 41.0.1 did include some improvements, the characters all render as they should but tracking (or kerning) is way off.
Whiteboard: [pdfjs-c-rendering][pdfjs-d-font-conversion][pdfjs-f-regression] → [pdfjs-c-rendering][pdfjs-d-font-conversion][pdfjs-f-regression][pdfjs-f-fixed-upstream] https://github.com/mozilla/pdf.js/pull/6736
Depends on: 1232015
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Updated to version 45 today and can indeed confirm that the issue has been fixed. Thanks!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: