Created attachment 120764 [details] Incorrectly rendered PDF The following PDF file is not properly rendered: http://www.mos6581.org/files/intro_template.pdf This is what it looks like in Evince: http://i.imgur.com/ha4J3XO.png Text typeset using a CFF/PostScript OpenType font is not being displayed using Identity-H encoding (two bytes per glyph). The text that is displayed is a Type1 font. Other PDF viewers (SumatraPDF, Adobe Reader, PDF-XChange, Foxit, Ghostscript, Apple Preview, recent PDF.js versions) display this PDF correctly. It is interesting to note that when the CFF OpenType font is replaced with a TrueType font (also Identity-H encoded), the resulting PDF rendered properly by Pooppler. See this issue for more information: https://github.com/brechtm/rinohtype/issues/2
Created attachment 120765 [details] Evince screenshot
Works fine with Okular so cairo backend bug it'd seem.
Created attachment 120772 [details] [review] add OT font types Add support for the two missing font types in cairo font: - fontCIDType0COT for this bug - fontTrueTypeOT (test case in bug 20605)
*** Bug 93780 has been marked as a duplicate of this bug. ***
Comment on attachment 120772 [details] [review] add OT font types Review of attachment 120772 [details] [review]: ----------------------------------------------------------------- Thanks for the patch, I have a couple of comments/questions, though. ::: poppler/CairoFontEngine.cc @@ +550,5 @@ > + codeToGID = NULL; > + n = 0; > + if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { > + n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); > + codeToGID = (int *)gmallocn(n, sizeof(int)); I think we should check n here just in case, because GfxFont allocates the array and then tries to fill it, so we could have codeToGID != NULL && codeToGIDLen == 0 @@ +553,5 @@ > + n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); > + codeToGID = (int *)gmallocn(n, sizeof(int)); > + memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), > + n * sizeof(int)); > + } Don't we need to handle here the case of not having a CIDtoGID and !useCIDs?
Created attachment 121439 [details] [review] add OT font types v2 Updated patch.
Pushed
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.