[Poppler-bugs] [Bug 93559] CFF OpenType fonts using Identity-H encoding not displayed
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Jan 31 02:20:36 PST 2016
https://bugs.freedesktop.org/show_bug.cgi?id=93559
--- Comment #5 from Carlos Garcia Campos <carlosgc at gnome.org> ---
Comment on attachment 120772
--> https://bugs.freedesktop.org/attachment.cgi?id=120772
add OT font types
Review of attachment 120772:
-----------------------------------------------------------------
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?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20160131/6e26e199/attachment.html>
More information about the Poppler-bugs
mailing list