[Sugar-devel] More information on font scaling problem

James Simmons jim.simmons at walgreens.com
Wed Jun 3 10:40:54 EDT 2009


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.  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.set_editable(False)
self.textview.set_cursor_visible(False)
self.textview.set_left_margin(50)
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))
self.textview.modify_font(self.font_desc)
self.scrolled.add(self.textview)
self.textview.show()
self.scrolled.show()
v_adjustment = self.scrolled.get_vadjustment()
self.clipboard = gtk.Clipboard(display=gtk.gdk.display_get_default(), 
selection="CLIPBOARD")
self.page = 0
self.textview.grab_focus()

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






More information about the Sugar-devel mailing list