[Sugar-devel] More information on font scaling problem

James Simmons jim.simmons at walgreens.com
Mon Jun 8 10:42:50 EDT 2009


Aleksey and Gary,

I just yesterday tried booting up my XO using the very latest beta of 
SoaS.  The font looked OK (reasonably close to what I was seeing in my 
test environment).  So I guess in .84 I won't have a problem.

I tried adding some code to Read Etexts to check for the SUGAR_SCALING 
environment variable and ran it on sugar-emulator on Fedora 10 and also 
on my XO running .82.  Neither one had the environment variable.  I 
didn't try with SoaS.  So that explains why style.zoom() had no effect.  
I'll probably just get rid of it in the next version of the Activity.

The current version of Read Etexts is usable on the XO running .82, XO 
running .84, and sugar-emulator on Fedora 10, even though the font size 
is different on all three.  The View tab allows the user to adjust the 
font size to his liking, so it is tolerable to have the font start up at 
three different sizes on the three platforms.  For most things I do use 
the default font size, so this isn't a show stopper.  I'm going to 
"Declare victory and quit." on this one.

As for the code Aleksey wrote (linked below), since there is no 
environment variable for the XO to use in style.zoom() I'm pretty sure 
his code would have no effect.  Plus style.zoom() already used a default 
scaling factor of 1.0 if there was no environment variable SUGAR_SCALING 
so it already should have worked in .82 and .84.  From my experience it 
didn't seem to hurt working in .84 at all.

Thanks for all the help, though.

James Simmons


Aleksey Lim wrote:
> On Fri, Jun 05, 2009 at 05:30:13PM +0200, Tomeu Vizoso wrote:
>   
>> On Fri, Jun 5, 2009 at 17:11, James Simmons<jim.simmons at walgreens.com> wrote:
>>     
>>> Tomeu,
>>>
>>> The thing is, in the code below I *am* using style.zoom.  It seems to have
>>> no effect at all.
>>>       
>> What I would have supposed that would work is using in 0.84 a fixed
>> font size of 10 and on the XO style.zoom(X). I didn't wanted to imply
>> that X could be 10, I think we were using a smaller font size in the
>> Sugar UI.
>>
>> Maybe Aleksey could add a zoom() function to sugar.port that on 0.82
>> would do some scaling based on the screen resolution and on 0.84 would
>> return the value unchanged?
>>     
>
> done,
> http://people.sugarlabs.org/~alsroot/sugar-port/port.style-module.html
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20090608/ca19e430/attachment.htm 


More information about the Sugar-devel mailing list