Bug 690341 - enhancement to CIDFont emulation with TrueType fonts
Summary: enhancement to CIDFont emulation with TrueType fonts
Status: RESOLVED DUPLICATE of bug 690340
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Font API (show other bugs)
Version: master
Hardware: PC Windows NT
: P4 enhancement
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-19 08:32 UTC by Ken Sharp
Modified: 2009-03-19 13:26 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Sharp 2009-03-19 08:32:23 UTC
The current CIDFont emulation using native TrueType fonts is less than optimal
with respect to CMAP tables. The problem is that the character code is mapped by
the PostScript CMap to a CID, but this has no meaning in TrueType. We tackle
this by converting the CID to a Unicode code point (via the UCS2 CMaps ?) which
we then pass through the Font's own Unicode CMAP tbale to produce a glyph ID.

At present we create a dictionary called TT_cmap from the TrueType font's CMAP
table (preferring a 3,0 Unicode subtable). We then use this in a call to
.fillCIDMap in order to build a 'GIDmap'. which we use to convert CIDs via
Unicode code points to a TrueType GID (glyph ID).

We try to use similar code in the FAPI module to perform the same task, but
because the font client is handling the font, we haven't copied the CMAP table
and so the code fails (see issue #689826).

I'm in the process of adding work-around code to the FAPI to handle this for
FreeType, but in the long run it would be nice to do away with holding the
TT_cmap dictionary altogether. If we could rationalise the code so that it works
with the FAPI clients and our own code at the same time that would be ideal.
Comment 1 Ken Sharp 2009-03-19 13:26:24 UTC
Sorry, entered this twice somehow.

*** This bug has been marked as a duplicate of 690340 ***