[Sugar-devel] F11 for XO1 - Fonts
Daniel Drake
dsd at laptop.org
Mon Aug 17 11:22:45 EDT 2009
2009/8/17 Art Hunkins <abhunkin at uncg.edu>:
> I'm dealing with another issue as well - one that is equally important: 4:3
> va. 16:9 displays. All my text has to be on a single screen; but 4:3 screens
> will display more *lines* than 16:9. What I'm trying to do is for my script
> to query for screen size (Walter showed me how - thanks, Walter!), and
> depending on the answer, compress some of the text so that it takes fewer
> lines.
>
> As a result, my script will need to determine the following:
> a) XO or not - result: set appropriate font size
> b) 4:3 or 16:9 - result: set appropriate font size (there *appears* to be a
> difference here, unfortunately - I've yet to figure out this disparity), and
> adjust number of lines and/or font size for selected text.
This is a bad approach.
If filling the screen (or an area of it) is important to you, then you
should render some text using the font and measure it's size, then
adjust accordingly. Measure is one example of an activity that does
this.
Otherwise, the only thing that is safe to assume is that 1 point means
1/72 of an inch. This alone is meaningless though, you should also
consider the size of the screen to see if that would feel
proportionally OK, and you also have to consider how far you expect
the user to be sitting from the screen.
Size 10pt on the XO looks uncomfortably large, but measure it and
you'll see that it's exactly the same size as size 10 on your regular
monitor, where it looks fine. The difference is that the XO screen is
proportionally much smaller and you generally sit closer to it.
The approach I'm advocating here is that nobody is encouraged to mess
with DPI (and Sugar does not touch this). Instead, Sugar ships a
default font and size setting (e.g. Sans 10) but allows it to be
easily overridable by deployments. Additionally the numeric part of
this can be changed through 2 new buttons in the control panel: "Make
fonts smaller" and "Make fonts bigger." But this has not been
implemented yet.
Daniel
More information about the Sugar-devel
mailing list