Re: GDK_FONT_XFTFONT
- From: Owen Taylor <otaylor redhat com>
- To: Keith Packard <keithp keithp com>
- Cc: gtk-devel-list gnome org
- Subject: Re: GDK_FONT_XFTFONT
- Date: Mon, 25 Feb 2002 15:59:42 -0500 (EST)
Keith Packard <keithp keithp com> writes:
> Around 12 o'clock on Feb 25, Owen Taylor wrote:
>
> > (My big performance problem with Xft right now is computing
> > coverage information, which either will be fixed with some
> > more code on our end or when we switch to fontconfig.)
>
> I've a question on that front -- Fontconfig computes coverage information
> itself; should we change Pango to push the coverage down to the rasterizer
> instead of forcing Pango to walk the Fontconfig coverage information?
> Fontconfig has an efficient coverage walking API, but avoiding it
> altogether would be better.
Well, a simple addition of pango_coverage_set_range() to go
along with pango_coverage_set() would make walking the
fontconfig coverage information and creating a PangoCoverage
pretty efficient.
We could certainly make PangoCoverage a virtualized object in a
compatible fashion. I'm not sure it's really worth the added
complexity; it's something that might best wait until it shows up on
memory / speed profiles.
> > You may well be well right that we should have worked on making
> > GdkFont still work; it's certainly a bit of a API hole that there
> > isn't a conventional character-by-character text drawing API
> > available.
>
> If this is a reasonable course, then perhaps the right idea is to create a
> new function that returns an Xft font for use by the rendering routines;
> that way legacy applications would continue to see only GDK_FONT_FONT and
> GDK_FONT_FONTSET but minor source modifications could switch applications
> to Xft fonts instead. That would make porting existing Gtk+ apps to use
> Xft would require few changes rather than a wholesale conversion to Pango.
I think most GTK+ apps don't actually use GdkFont directly. Most
people use widgets, GnomeCanvas, etc.
So far, we haven't had a lot of questions about Pango on the GTK+
lists as compared to questions about the new Text and especially
Tree widgets.
The feedback after 2.0 will be the primary way of knowing if we need
to do more; and if we see lots of GTK+-2.0 apps still using the
deprecated GdkFont, then we'll know that we need to deal with
issue of providing a easy-to-use GdkFont replacement.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]