Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Into Pdf seems to be broken #2

Closed
michaelko opened this issue Nov 4, 2013 · 7 comments
Closed

The Into Pdf seems to be broken #2

michaelko opened this issue Nov 4, 2013 · 7 comments

Comments

@michaelko
Copy link

michaelko commented Nov 4, 2013

At last it does not look like i think it should on my computer in neither evince nor firefox. I'm talking about this file

evince screenshot

@brechtm
Copy link
Owner

brechtm commented Nov 6, 2013

RinohType handles OpenType fonts as a CID font, using Identity-H encoding. This enables accessing all of the 65536 glyphs in an OpenType font, as opposed to only 256 when using a standard encoding. I opted to do this to make handling of different scripts much easier (internally).

When you replace texgyretermes-regular.otf with Windows's times.ttf in rfic2009style.py, the generated PDF is rendered correctly in Firefox. Both are OpenType fonts, but the key difference between them is that the former contains Type1 outlines (CFF/Postscript OTF) and the latter contains TrueType outlines (TrueType OTF). Both are included as a CID font in RinohType and use Identity-H mapping, so this might indeed be a bug in Evince and PDF.js (see also this comment by rhythmvs).

Can you try replacing texgyretermes-regular.otf with a TrueType font and see what happens in Evince?

I have not been able to find an example PDF file with a CFF OTF embedded using the Identity-H encoding, so I cannot verify whether RinohType makes a mistake or whether this is a bug in Evince/PDF.js. All I know is that the following applications render the PDF correctly:

  • SumatraPDF
  • Adobe Reader
  • PDF-XChange Reader
  • Foxit PDF Reader
  • Ghostscript (doesn't report any errors)

If this is indeed a bug in the Evince/PDF.js, I would rather not change the current handling of OpenType fonts as it would need a lot of code to work around the 256 glyph limit. I did not find a known bug in Poppler (the PDF library that Evince uses) that describes this problem though.

@frol
Copy link
Contributor

frol commented Dec 31, 2015

FYI, PDF.js in Firefox 43.0.1 (Arch Linux) renders the intro_tempate.pdf correctly! However, Evince 3.18.2 (poppler 0.39.0) still has the bug and looks just like on the screenshot provided above. You seem to understand the issue better, so could you please file the bug on Poppler's bugtracker?

@brechtm
Copy link
Owner

brechtm commented Jan 2, 2016

Yes, I noticed recent versions of PDF.js do indeed render RinohType PDFs correctly. Didn't think of updating this issue though, so thanks!

Poppler bug reported: https://bugs.freedesktop.org/show_bug.cgi?id=93559

@brechtm
Copy link
Owner

brechtm commented Jan 2, 2016

PDF.js fixed this problem somewhere between v1.0.1149 and v1.0.1212 (changes).
Possibly fixed by mozilla/pdf.js#5770

@brechtm
Copy link
Owner

brechtm commented Feb 15, 2016

The poppler bug has been fixed.

@brechtm brechtm closed this as completed Feb 15, 2016
@frol
Copy link
Contributor

frol commented Feb 19, 2016

I can confirm that the PDF works fine now with Poppler 0.41 release!

@brechtm
Copy link
Owner

brechtm commented Feb 19, 2016

Thanks for verifying frol!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants