<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - CFF OpenType fonts using Identity-H encoding not displayed"
href="https://bugs.freedesktop.org/show_bug.cgi?id=93559#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - CFF OpenType fonts using Identity-H encoding not displayed"
href="https://bugs.freedesktop.org/show_bug.cgi?id=93559">bug 93559</a>
from <span class="vcard"><a class="email" href="mailto:carlosgc@gnome.org" title="Carlos Garcia Campos <carlosgc@gnome.org>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=120772" name="attach_120772" title="add OT font types">attachment 120772</a> <a href="attachment.cgi?id=120772&action=edit" title="add OT font types">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=93559&attachment=120772'>[review]</a>
add OT font types
Review of <span class=""><a href="attachment.cgi?id=120772" name="attach_120772" title="add OT font types">attachment 120772</a> <a href="attachment.cgi?id=120772&action=edit" title="add OT font types">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=93559&attachment=120772'>[review]</a>:
-----------------------------------------------------------------
Thanks for the patch, I have a couple of comments/questions, though.
::: poppler/CairoFontEngine.cc
@@ +550,5 @@
<span class="quote">> + codeToGID = NULL;
> + n = 0;
> + if (((GfxCIDFont *)gfxFont)->getCIDToGID()) {
> + n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
> + codeToGID = (int *)gmallocn(n, sizeof(int));</span >
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 @@
<span class="quote">> + n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
> + codeToGID = (int *)gmallocn(n, sizeof(int));
> + memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
> + n * sizeof(int));
> + }</span >
Don't we need to handle here the case of not having a CIDtoGID and !useCIDs?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>