[cairo] Font issues in PS and PDF

Adrian Johnson ajohnson at redneon.com
Thu Dec 4 04:15:24 PST 2008


AngryZealot wrote:
> OpenType fonts now work perfectly for my purposes. TrueType fonts do
> not -- any four letter string becomes  when saved. The output
> depends on the number of characters, not the contents of the string.
> (This is now just with the toy API. I haven't tested the new additions
> using Pango, but the 1.8.4 release functions identically in this
> respect.)

This is probably caused by the character map (cmap) table in the font 
subset mapping the unicode characters 0xff00, 0xff01, ... to each glyph 
in the subset. This was required by the PDF specification when we were 
embedding 8-bit TrueType subsets. Since switching to CID font subsets 
the cmap table is no longer required but the code was never removed.

I've attached a patch you can try that prevents the cmap from being 
included in the subset. If that doesn't work I will look at writing a 
patch to make the cmap table use the correct unicode mappings.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-cmap.patch
Type: text/x-patch
Size: 888 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20081204/8c8e3cd9/attachment.bin 


More information about the cairo mailing list