[Output Generation] Poor kerning for cairo text rendering especially at small font sizes
Ported Issue from Mantis Original ID: 2331 Reported By: ryandesign
SEVERITY: COSMETIC Submitted: 2013-08-20 04:00:17
OS: OS X
OS BUILD: 10.8.4
When using cairo (1.12.14) output ("-Tpng"), the kerning (the spacing between characters) is not accurate, especially at small font sizes. Based on observation, it appears to me that each character is positioned based on the specified font size, and that each character's position is rounded to the nearest integer, and then later, that's scaled to the graph's dpi. In the extreme case of very small font size and very large dpi (see attached graph with 1pt font size and 3000 dpi), this results in very poor rendering. This example may be contrived, but the problem was apparent to me at larger font sizes as well, which prompted me to investigate.
STEPS TO REPRODUCE
dot -Tpng font.gv > font.gv.png dot -Tpng:quartz font.gv > font.gv.quartz.png
On OS X, Quartz output ("-Tpng:quartz") does not have this problem.