[Bugs] #905 UNSP: Read Etexts-11, view zoom out button initially zooms in a little

SugarLabs Bugs bugtracker-noreply at sugarlabs.org
Sun May 31 09:47:16 EDT 2009


#905: Read Etexts-11, view zoom out button initially zooms in a little
------------------------------------------+---------------------------------
    Reporter:  garycmartin                |          Owner:  jdsimmons                  
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  Read Etexts                |        Version:  Unspecified                
    Severity:  Unspecified                |     Resolution:                             
    Keywords:                             |   Distribution:  Unspecified                
Status_field:  Unconfirmed                |  
------------------------------------------+---------------------------------

Comment(by jdsimmons):

 OK, I figured out why this is happening.  In my original code I set the
 font size to "sans 12".  Then I discovered that if I did that it looked
 fine in sugar-emulator but was enormous on the XO.  For this reason I just
 used the default font and only set the font size explicitly when making
 the font bigger or smaller.  This made the Activity look the same on both
 platforms (until you changed the font size).

 I used some code from Tomeu's posting to sugar-devel:

 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

 This code did not help, so I changed the font size to 10 and it's still
 too big on the XO and too small everywhere else but the Activity is
 useable and increasing and decreasing the font size works the way you
 would expect it to.

 I don't consider this issue closed.

-- 
Ticket URL: <http://dev.sugarlabs.org/ticket/905#comment:2>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list