[Poppler-bugs] [Bug 91286] [patch] to fix Syntax Warning: Could not parse ligature component "BE" of "S_BE" in parseCharName

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 1 17:10:41 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=91286

--- Comment #7 from William Bader <williambader at hotmail.com> ---
poppler follows a convention (which is not a required rule) of splitting glyph
names at underscores to handle ligatures, see parseCharName() in GfxFont.cc.

  // Step 2: split the remaining string into a sequence of components, using
  // underscore (U+005F LOW LINE) as the delimiter.
  if (ligatures && strchr(charName, '_')) {
    // parse names of the form A_a (e.g. f_i, T_h, l_quotesingle)


If a glyph name with an embedded underscore is not in nameToUnicodeTextTab[],
poppler will split it at the underscore and won't be able to find it.

When poppler-based applications run on the attached PDF (which has a glyph
named "S_BE"), they display

Syntax Warning: Could not parse ligature component "BE" of "S_BE" in
parseCharName

because parseCharName() thinks that "S_BE" is an "S" plus a ligature called
"BE", and there is no ligature called "BE" because the glyph is named "S_BE"
with the embedded underscore.

When parseCharName() prints that syntax warning, it has failed to parse the
glyph name, and it has placed either nothing or the wrong value in uBuf[].

That is what I meant that "S_BE" is inaccessible.

The comment for parseCharName() says

// This function is in part a derived work of the Adobe Glyph Mapping
// Convention: http://www.adobe.com/devnet/opentype/archives/glyph.html
// Algorithmic comments are excerpted from that document to aid
// maintainability.

but Acrobat displays the attached file without showing error messages, so
Adobe's document (the basis of the code in parseCharName()) does not fully
describe how Acrobat works.

Very few fonts have glyph names with embedded underscores because it violates
Adobe's recommendations.  The attached patch includes three of them that are
relatively widespread.

-- 
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/20150902/3690dee3/attachment-0001.html>


More information about the Poppler-bugs mailing list