Re: Call for text size and style advice for Gnome 2

Date: Mon, 07 Jan 2002 16:21:15 -0800
>One of the things that the Nautilus team worked hard on was choosing font
>sizes and styles that look nice for the various widgets in the user
>interface, mostly GtkLabel widgets.
>The way this was done in most places was to create the widget with the
>default font, and then call functions to make the font a few places smaller
>or larger, or to make the font bold.
>There are about 15 or so other places that do things to make the font bigger
>or smaller or bold, and I'd like to figure out what to do about them. What's
>the standard Gnome way of handling things like this? Does this somehow
>relate to RC files? How should these interact with user font choices in the
>Nautilus preferences dialog?
>Havoc told me that the old way it was done is not good for accessibility and
>that instead I should be using gtk_label_set_markup. This has a few
>problems, though. For one thing, if the label is one that has text that can
>be changed, each place that changes the text has to use
>gtk_label_set_markup. For another, if the label has arbitrary text in it,
>there's no guarantee it won't have something that looks like markup. So this
>seems like it might not be the right approach. I don't understand how it
>helps for accessibility either, so I am working in the dark here.

Hi Darin/folks:

There are a couple of accessibility implications here. 

The first accessibility implication regards theme compliance, which, depending 
on how you do your font size scaling, may or may not be reasonable already; in 
short Nautilus should behave "reasonably" with regard to the the existing GTK+ 
theme, basing its font sizes (and styles!) on the current GTK+ theme.  Looks 
like this one is well in hand already, from reading the discussion so far; the 
only potential issue is that in 'some' cases it's important to a particular 
user to specify Sans-serif fonts everywhere, for instance, so ideally there 
should be a way to at least optionally adhere to the theme's font typeface as 
well as size.

The other issue has to do with the (possibly non-sighted) user's interest in 
knowing if the text has been "attributed" in some way, including boldfacing, 
size adjustment, and color adjustment.  If you use the pango markup/attribution 
mechanisms then this information is exposed "automatically" via ATK/GAIL as 
text attributes.

Any other accessibility issues are, I believe, dealt with as long as standard 
GtkWidgets are used for the text display.  Custom widgets that use Pango 
layouts should be fairly easy to add support for as well, for instance you 
might look at the AtkText interface implementations in 
gail/gail/gailtextview.c.  Eventually we will want to write similar AtkObject 
implementations for libeel - these can be added compatibly post 2.0, as long as 
the underlying text display behaviors are well-behaved and theme-friendly.


>(There's also code that selects the largest possible font that will fit up
>to a certain size that and code that uses ellipses as needed. I could use
>help or advice about how to do these with Pango and perhaps GtkLabel.)

This code might want to include some smarts based on the default gtkrc font 
size, to help set up these heuristics.


>    -- Darin
>gnome-2-0-list mailing list
>gnome-2-0-list gnome org

Bill Haneman x19279
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]