Re: [Nautilus-list] Rename Eel



iain <iain ximian com> writes:
> On 19 Jul 2001 14:36:33 -0400, Havoc Pennington wrote:
> > 
> > iain <iain ximian com> writes: 
> > > I'd like the font stuff to go somewhere.
> > 
> > What is the font stuff? If you mean all the truetype font handling,
> > etc., Pango replaces all that in principle.
> 
> Yeah, that and librsvg's stuff for doing "Here's font.ttf, give me a
> pixbuf with the text 'Paradise Rock' underlined in red size 34 pixels".
> But if Pango can do that, then I guess I'm happy.
> 

Pango can do the "hard bits" of that, with working i18n. Owen says
GnomeCanvasText uses this in HEAD. It probably isn't super-convenient
to do at the moment (there is no function "draw text to pixbuf"). GTK
doesn't link to Pango/freetype at the moment so it would be sort of an
expensive convenience function to add.

For most of the places Nautilus uses this I think it's a bit of a Bad
Idea - if you draw regular labels this way, you won't use the user's
normal font configuration or fonts. And the antialiasing, etc. will be
done with Xft if you just use the regular GTK API.

By "Bad Idea" I mean it would be bad if starting from scratch with GTK
2, I don't mean the nautilus guys necessarily made the wrong decision
given GTK 1.2.

Anyhow, in general you must use Pango (or ICU, or equivalent) to lay
out and draw any text - if you don't, your code is totally broken for
non-European locales. Doing things like word break or line wrap or
justification manually is no longer feasible in a Unicode world.

Havoc





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