Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#282 closed defect (fixed)

Sugar UI fonts are extremely small (SoaS1 running off XO nand) at certain locations

Reported by: garycmartin Owned by: marcopg
Priority: Normal Milestone: Unspecified
Component: Sugar on a Stick (SoaS) Version: 0.83.x
Severity: Major Keywords:
Cc: sascha_silbe, FGrose, marco, sdz, erikos Distribution/OS: Unspecified
Bug Status: Resolved

Description

Test booting the SoaS1 image off XO nand. All Sugar fonts are extremely small, just readable if you put your face very close to screen :-) Seems like the font dpi is way off, the rest of the icons/UI seem fine.

Attachments (2)

fonts.patch (1.4 KB) - added by erikos 15 years ago.
sugar patch
fonts_toolkit.patch (576 bytes) - added by erikos 15 years ago.
sugar-toolkit

Download all attachments as: .zip

Change History (18)

comment:1 Changed 15 years ago by FGrose

I would add that, even while running from a USB flash drive, the system typefaces should be enlarged for a 1280x1024 display to keep them in proportion to the rest of the Sugar interface.

Bert did a nice job in scaling things with his image for VMWare (http://croquetweak.blogspot.com/2008/12/emulating-latest-stable-olpc-xo.html)

comment:2 Changed 15 years ago by sascha_silbe

  • Cc sascha_silbe added

comment:3 Changed 15 years ago by FGrose

  • Bug Status changed from Unconfimed to New
  • Cc FGrose added
  • Distribution/OS changed from Unspecified to SoaS
  • Summary changed from All Sugar UI fonts extremely small (SoaS1 running off XO nand) to Sugar UI fonts are extremely small (SoaS1 running off XO nand) at certain locations

There are good improvements in Soas-200902221746.iso, but the Journal text size on the main table is even smaller than before. On the details panel, the activity name is fine, but the labels including date-time are very small. Text entry size is satisfactory.

comment:4 Changed 15 years ago by tomeu

Just checked the code and the font size for that text is 7 * (SUGAR_SCALING / 100).

comment:5 Changed 15 years ago by FGrose

There are problems as well with the scaling of certain text-containing elements like the Run!, Stop, Clear buttons in Pippy and the Home view XO context panel icon (where the crown and feet are clipped in the main label).

comment:6 Changed 15 years ago by tomeu

  • Cc marco added

What if we don't set any absolute font sizes in general, and let special platforms like the XO override those values?

Just removed, on an eeepc, the font sizes from sugar/graphics/style.py, share/sugar/data/sugar-*.gtkrc, TerminalActivity/terminal.py and ~/.sugar/default/terminalrc and it looks really good.

If we had a way to influence the text size calculated by gtk (or would it be pango) on the platforms like the XO where the text size is miscalculated, we may be able to find a solution that works on almost all computers.

comment:7 Changed 15 years ago by erikos

Found another one:

diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py
index 1d44ac3..b7727e4 100644
--- a/src/jarabe/view/viewsource.py
+++ b/src/jarabe/view/viewsource.py
@@ -37,7 +37,7 @@ from sugar.bundle.activitybundle import ActivityBundle
 from sugar.datastore import datastore
 from sugar import mime
 
-_SOURCE_FONT = pango.FontDescription('Monospace %d' % style.zoom(6))
+_SOURCE_FONT = pango.FontDescription('Monospace')# %d' % style.zoom(6))
 
 _logger = logging.getLogger('ViewSource')
 map_activity_to_window = {}

comment:8 follow-up: Changed 15 years ago by tomeu

Ok, so tested this approach on an eeepc and a XO and seems to work fine. Gtk/pango calculates correctly the default font size so it's a matter of setting the correct SUGAR_SCALING values for icon sizes, etc

What needs to be done is:

  • Remove any font sizes from sugar/data/gtkrc.em
  • Remove any font sizes from sugar-toolkit/src/sugar/graphics/style.py
  • Remove any font sizes from terminal-activity/terminal.py (Monospace 8)
  • Change the kickstart file to generate a .Xclients file that will guess the correct SUGAR_SCALING value from xdpyinfo:
xsetroot -def

RESOLUTION=$(xdpyinfo | grep resolution | sed "s/.* \\([0-9][0-9]*\\)x.*/\\1/")

if [ "$RESOLUTION" -gt 150 ]; then
    SUGAR_SCALING=100
else
    SUGAR_SCALING=72
fi

SUGAR_SCALING=$SUGAR_SCALING sugar

comment:9 in reply to: ↑ 8 Changed 15 years ago by tomeu

Replying to tomeu:

What needs to be done is:

Also need to remove the explicit font size in viewsource.py.

Changed 15 years ago by erikos

sugar patch

Changed 15 years ago by erikos

sugar-toolkit

comment:10 Changed 15 years ago by erikos

# setup Xclients
echo "xsetroot -def" > /home/liveuser/.Xclients
RESOLUTION=$(xdpyinfo | grep resolution | sed "s/.* \\([0-9][0-9]*\\)x.*/\\1/")
if [ "$RESOLUTION" -gt 150 ]; then
    SUGAR_SCALING=100
else
    SUGAR_SCALING=72
fi
echo "SUGAR_SCALING=$SUGAR_SCALING sugar" >> /home/liveuser/.Xclients
chmod a+x /home/liveuser/.Xclients
chown liveuser:liveuser /home/liveuser/.Xclients

comment:11 Changed 15 years ago by erikos

# setup Xclients
cat >> /home/liveuser/.Xclients << FOE
xsetroot -def

RESOLUTION=$(xdpyinfo | grep resolution | sed "s/.* \\([0-9][0-9]*\\)x.*/\\1/")
if [ "$RESOLUTION" -gt 150 ]; then
    SUGAR_SCALING=100
else
    SUGAR_SCALING=72
fi

SUGAR_SCALING=$SUGAR_SCALING sugar
FOE

chmod a+x /home/liveuser/.Xclients
chown liveuser:liveuser /home/liveuser/.Xclients

comment:12 Changed 15 years ago by FGrose

With Soas-200902281625.iso, there are some text controls that are tiny in Browse, i.e., the login fields for dev.sugarlabs.org,

comment:13 follow-up: Changed 15 years ago by FGrose

  • Cc sdz erikos added

With Soas-200903011706.iso, there are still tiny text entry fields on some Browse pages (e.g., the login fields for dev.sugarlabs.org) that weren't a problem before ~0228.

comment:14 in reply to: ↑ 13 Changed 15 years ago by alsroot

Replying to FGrose:

With Soas-200903011706.iso, there are still tiny text entry fields on some Browse pages (e.g., the login fields for dev.sugarlabs.org) that weren't a problem before ~0228.

in new soas(0.84 based) it should work -- problem was because of missed font size in gtk-font-name section of gtkrc

comment:15 Changed 15 years ago by FGrose

  • Bug Status changed from New to Resolved
  • Resolution set to fixed
  • Status changed from new to closed

comment:16 Changed 14 years ago by sascha_silbe

  • Distribution/OS changed from SoaS to Unspecified

Bulk change distribution=SoaS -> component=SoaS

Note: See TracTickets for help on using tickets.