[Sugar-devel] More information on font scaling problem
tomeu at sugarlabs.org
Fri Jun 5 05:16:44 EDT 2009
On Wed, Jun 3, 2009 at 16:40, James Simmons<jim.simmons at walgreens.com> wrote:
> I mentioned before that I'm having a font sizing problem on the XO
> running .82. When I set a font on a textviewer it looks OK running
> under sugar-devel or SoaS by is *much* larger on the XO.
Sorry, in an earlier email i replied to you what would work in 0.84,
didn't realized you were talking about 0.82.
In 0.84 Pango knows the resolution of the screen and scales all fonts
accordingly. This means that by using, say 10, the font will always
look good in all hw.
In 0.82 didn't knew about the screen, so we were scaling all fonts by
Aleksey, do you have an idea about what can do activity authors that
wish to provide a single bundle that looks good both in 0.82 and 0.84?
> This is the
> code I'm currently using:
> self.scrolled = gtk.ScrolledWindow()
> self.scrolled.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
> self.scrolled.props.shadow_type = gtk.SHADOW_NONE
> self.textview = gtk.TextView()
> self.textview.connect("key_press_event", self.keypress_cb)
> buffer = self.textview.get_buffer()
> buffer.connect("mark-set", self.mark_set_cb)
> self.font_desc = pango.FontDescription("sans %d" % style.zoom(10))
> v_adjustment = self.scrolled.get_vadjustment()
> self.clipboard = gtk.Clipboard(display=gtk.gdk.display_get_default(),
> self.page = 0
> The "sans 10" font is really too small for SoaS but on the XO it makes
> 80 columns of text fill the width of the screen. Any ideas?
> James Simmons
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
More information about the Sugar-devel