[Sugar-devel] FWD: Sugar font size & wiki

Tomeu Vizoso tomeu at sugarlabs.org
Thu Apr 23 03:36:46 EDT 2009


On Wed, Apr 22, 2009 at 20:22, Christoph Derndorfer
<christoph.derndorfer at gmail.com> wrote:
> Dear all,
>
> a small team of students and a professor at the Technical University
> Graz (in CC) is currently working on an activity to exercise Maths based
> on the requests by the teachers of our small Austrian OLPC / Sugar pilot.
>
> Anyway, they're currently running into some issues wrt to setting the
> font-size in their activity, please see the message below for details.
>
> Any help or pointers to possible solutions would be greatly appreciated!
>
> Thanks in advance,
> Christoph
>
> Walther Neuper schrieb:
>
> --- snip ---
>> Two issues become urgent now:
>>
>> # Sugar does _not_ accept our way of specifying the font size:

Hi,

the best way to do this in versions <0.84 is:

from sugar.graphics import style
pango.FontDescription("sans %d" % style.zoom(72))

This way, it should scale correctly both on the XO and in normal
machines. It's basically the same that Walter does, but should be
simpler.

In Sugar >=0.84, just specify always the same font size and it should
look fine in all screens.

HTH,

Tomeu

>>        self.toggle_equal = gtk.ToggleButton("<==>")
>>        self.toggle_equal.modify_font(pango.FontDescription("sans 72"))
>>        self.toggle_equal.connect("toggled", self.toggle_equal_callback)
>>        self.settings_table.attach(self.toggle_equal, 3, 4, 11, 12 )
>>        self.toggle_equal.show()
>>
>>   With this code the font size is taken as a (too small) default, and we
>> would like to
>>   deliver ReckonPrimer1.0 as soon as possible
> --- snip ---
>
> --
> Christoph Derndorfer
> co-editor, olpcnews
> url: www.olpcnews.com
> e-mail: christoph at olpcnews.com
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>


More information about the Sugar-devel mailing list