[Sugar-devel] Font display revisited
Art Hunkins
abhunkin at uncg.edu
Fri Feb 19 18:04:58 EST 2010
I am perplexed (nothing unusual).
I use the following recommended code to determine default font size for
various versions of the XO and SoaS:
font = widget.get_pango_context().get_font_description()
font_size = font.get_size()
Recognizing that 1024 pango units = 1 point in font size, the various
distributions furnish the following values:
XO-1, 7168 = 7pt. and displays at 7pts.
Strawberry, 10240 = 10pt., but displays at 7pts.
Blueberry, 10240 = 10pt., displaying correctly at 10pts.
Latest release, 0.87.3 (Generic Release 12), 10240, but displays at
approximately 7.5pts.
In other words, SoaS releases with the same pango font description (= what
we are urged to deal with rather than font sizes directly) display on the
same monitor very differently. I think surely that the same pango
description should display about the same (width-wise at least) for a given
monitor, regardless of release.
What particularly confuses me is that the latest release nearly reverts to
the Strawberry sizing, which was clearly too small for an average monitor.
Do we need to anticipate that each new version of SoaS will effectively give
a different default display size, even when pango contexts are identical?
This makes no sense whatever to me. It gives the developer little control
over text display at all, with the possible exception of furnishing
different code for each incarnation of SoaS. (This is what I'm currently
doing - but I'd rather this not be a lifelong task.)
Art Hunkins
More information about the Sugar-devel
mailing list