Opened 15 years ago

Closed 15 years ago

#905 closed defect (fixed)

Read Etexts-11, view zoom out button initially zooms in a little

Reported by: garycmartin Owned by: jdsimmons
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Read Etexts Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed


The initial click of the zoom out (-) button actually makes the text larger and not smaller as expected.

Change History (4)

comment:1 Changed 15 years ago by jdsimmons

I recreated this problem last night. I never hit the minus button first before, always the plus button, so I hadn't seen this before. Also, I see that if you hit the plus button first the font grows more than it should. I remember having a hard time figuring out how to size fonts in pygtk. Looks like I'll have to look at it some more.

comment:2 Changed 15 years ago 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:


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

from 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

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



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.

comment:3 Changed 15 years ago by jdsimmons

  • Status changed from new to accepted

comment:4 Changed 15 years ago by jdsimmons

  • Resolution set to fixed
  • Status changed from accepted to closed

I have set the default font size to something that is usable on the XO and elsewhere, although it is larger on the XO than it is in my Sugar test environment. Because of this increasing and decreasing the font size works the way it should.

Note: See TracTickets for help on using tickets.