[cairo] Font size issue when using pango + cairo

James Cloos cloos at jhcloos.com
Mon Jan 5 11:58:36 PST 2009


>>>>> "Emmanuel" == Emmanuel Pacaud <emmanuel.pacaud at lapp.in2p3.fr> writes:

Emmanuel> I should have said "almost the same" (in the goffice case, the
Emmanuel> scale_x value is used for both the x and y scales). The
Emmanuel> difference is too small to explain the font size issue.

The nasty side effect of reading mail just after waking up.... ;-/

A closer look shows that the glyphs rendered by gnumeric have a 9-pixel
cap height/digit height, are LCD optimized and look to have been pixel-
fit by glyf instructions.  The axis labels, OTOH, have a digit height of
10 pixels and look to have been rendered w/o any hinting or pixel fitting
--certainly w/o use of instructions.  The large 10 under the chart has a
pixel height of 13 or 14 and was also rendered w/o instructions and,
again, probably w/o any hinting or pixel fitting.

The small difference in the matrices could make for a 1 pixel height
difference.  The lack of instruction could also make for a 1 pixel height
difference.  (Look at the font with ft2demo's ftdiff(1) and magnification
to see whether it makes a difference at that pixel size.)

Also, your terminal app looks to be using DejaVu Sans Mono w/
instructions but is not using LCD optimization.  And the LCD filtering is
different; gnumeric looks to be using the legacy filter whereas the wm
looks to be using the instructions and LCD optimization but either w/o
any lcd filter or with freetype's filter.

Given the hinting and filtering differences, you may also have a dpi
difference.  You may have dpi set in gnome's settings but not in xft's.
And the charting app may be ignoring either or both of those.

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6


More information about the cairo mailing list