Ticket #282 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

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

Reported by: garycmartin Owned by: marcopg
Priority: Normal Milestone: Unspecified by Release Team
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

fonts.patch Download (1.4 KB) - added by erikos 4 years ago.
sugar patch
fonts_toolkit.patch Download (0.6 KB) - added by erikos 4 years ago.
sugar-toolkit

Change History

  Changed 4 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)

  Changed 4 years ago by sascha_silbe

  • cc sascha_silbe added

  Changed 4 years ago by FGrose

  • cc FGrose added
  • distribution 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
  • status_field changed from Unconfimed to New

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.

  Changed 4 years ago by tomeu

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

  Changed 4 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).

  Changed 4 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.

  Changed 4 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 = {}

follow-up: ↓ 9   Changed 4 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

in reply to: ↑ 8   Changed 4 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 4 years ago by erikos

sugar patch

Changed 4 years ago by erikos

sugar-toolkit

  Changed 4 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

  Changed 4 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

  Changed 4 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,

follow-up: ↓ 14   Changed 4 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.

in reply to: ↑ 13   Changed 4 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

  Changed 4 years ago by FGrose

  • status changed from new to closed
  • resolution set to fixed
  • status_field changed from New to Resolved

  Changed 3 years ago by sascha_silbe

  • distribution changed from SoaS to Unspecified

Bulk change distribution=SoaS -> component=SoaS

Note: See TracTickets for help on using tickets.