GNOME Bugzilla – Bug 519575
Wrong inter-letter spacing in print and PDF.
Last modified: 2009-01-03 01:17:16 UTC
Please describe the problem: In specific cases of code, the inter-letter spacing is slightly off. The problem can suddenly go away when changing seemingly unrelated code. Steps to reproduce: 1. Compile and run the attatched code 2. Export to PDF 3. Print to PDF through PDFCreator. Actual results: Some letters run into each other, others are spaced too wide apart. The problem appears between different pairs in different font sizes. Expected results: Proper and consistent spacing, like what you get if you follow the comments on lines 25-43 or 62-66 or 120. Does this happen every time? Yes, but you never know what you get if you continue coding (I don't (know)). Other information:
Created attachment 106279 [details] Illustrating code.
Created attachment 106290 [details] PDF produced by Cairo.
Created attachment 106291 [details] Print output produced by PDFCreator Rows 26-37 have been uncommented.
Could it be that what we see here are rounding errors? If I understand matters correctly, then the pango device units are cairo units when using pango_cairo. In this case the cairo context is scaled to work in mm, which is a rather large unit compared to screen pixels, let alone printer dots. Or is it that pango assumes that glyphs need to be positioned at integer device units, i.e, whole millimeters?
The problem seems to be gone in Pango trunk at least for the PDF export. I don't have any other version of Pango now on this machine so I can't check against Pango 1.18, sorry. But anyway, trunk will become Pango 1.20 in a few days, so when that has been released and a Windows build appears, please check with that.
pango-1.20.0 was released an hour ago...
Oops, I should build, package and upload it then. Or actually, I'll wait for GLib 2.16.0 first.
Actually I don't seem to be able to reproduce the export to PDF problem (haven't tried the printing one) even with Pango 1.18.4, GTK+ 2.12.8 and cairo 1.4.14. What exact versions of Pango, GTK+ and cairo are you using? What does the etc/pango.aliases file that your Pango uses look like?
Pango 1.18.4 Cairo 1.4.14 GTK+ 2.12.6 pango.aliases will follow in a moment.
Created attachment 106994 [details] etc\pango\pango.aliases
*** This bug has been marked as a duplicate of 558350 ***