Call for text size and style advice for Gnome 2



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.

The first piece of Nautilus code that's trying to follow this advice, in
nautilus_music_view_update, seems like it might malfunction for some kinds
of album or artist names and it also looks pretty unwieldy to have the
markup in there in printf format strings.

I'd like to straighten all of this out in Nautilus quickly so I can move on
to other aspects of porting, but I could use a little advice.

(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.)

    -- Darin




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