Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002331graphvizOutput Generationpublic2013-08-19 23:002013-08-20 00:33
Reporterryandesign 
Assigned To 
PrioritylowSeveritycosmeticReproducibilityalways
StatusnewResolutionopen 
Platformx86_64OSOS XOS Version10.8.4
Summary0002331: Poor kerning for cairo text rendering especially at small font sizes
DescriptionWhen 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 Reproducedot -Tpng font.gv > font.gv.png
dot -Tpng:quartz font.gv > font.gv.quartz.png
Additional InformationOn OS X, Quartz output ("-Tpng:quartz") does not have this problem.
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSION2.33.20130815.0446
Attached Files? file icon font.gv [^] (130 bytes) 2013-08-19 23:00
png file icon font.gv.png [^] (7,930 bytes) 2013-08-19 23:01


png file icon font.gv.quartz.png [^] (16,474 bytes) 2013-08-19 23:01

- Relationships

-  Notes
User avatar (0000430)
ellson (administrator)
2013-08-19 23:59

Are you sure you are using the pango/cairo renderer on the Mac with just -Tpng ?

Can you confirm with: dot -v -Tpng:cairo font.gv


Please attach the stderr output.
User avatar (0000431)
ellson (administrator)
2013-08-20 00:17

Never mind, ignore that, I can recreate the issue on a linux box.

but I don't see anything in my code that could be causing this - unless I'm missing a flag to turn on kerning in pango .... checking
User avatar (0000432)
ellson (administrator)
2013-08-20 00:33

FYI:
    $ pango-view --font="Times-Roman 1" --dpi=3000 --text="The quick brown fox"
produces reasonable output, so it does appear to be my problem.

- Issue History
Date Modified Username Field Change
2013-08-19 23:00 ryandesign New Issue
2013-08-19 23:00 ryandesign File Added: font.gv
2013-08-19 23:01 ryandesign File Added: font.gv.png
2013-08-19 23:01 ryandesign File Added: font.gv.quartz.png
2013-08-19 23:59 ellson Note Added: 0000430
2013-08-20 00:17 ellson Note Added: 0000431
2013-08-20 00:33 ellson Note Added: 0000432


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker