Comment 26 for bug 185700

Revision history for this message
In , Adrian Johnson (ajohnson-redneon) wrote :

When testing potential fixes for this bug I suggest checking the PostScript output. Currently I'm seeing strings like this:

[<00010002>-14<0003>15<0004>-14<0005>14<00060007>-14<0008>-14<0009>14<000
a>28<000b>-42<000c>]TJ

If glyphs are positioned are there natural unhinted glyph advances the above string would be:

<000100020003000400050006000700080009000a000b000c>Tj

Cairo defines PostScript functions equivalent to PDF operators so the same printing code can be shared by PS and PDF. The "Tj" is the PDF equivalent of the PostScript "show" than prints a string of text. "TJ" is the PDF operator that prints a string with a relative offset adjustment between each glyph for use with kerned text.

Cairo checks for strings of glyphs that are at their natural glyph advance and optimises the output to avoid positioning each individual glyph. PostScript output that uses "Tj" (except when kerning is required) is going to be result in smaller and more efficent output.