Re: [scintilla] Pango support on GTK+ 2.x



On Sun, Mar 09, 2003 at 04:16:09PM +0530, Biswapesh Chattopadhyay wrote: 
> I'd really like to use Pango exclusively for the text, mainly because:
> 	1. The overall look-n-feel of anjuta is spoilt because the editor fonts
> look totally out-of-sync with the rest of the GUI
> 	2. The preferences stuff, especially fonts, will become very awkward
> with the hacks to support special indicators for pango fonts. Also,
> gtk-fontselection will be difficult to use because of this.
> 
> However, a 9X slowness just for using Pango seems a bit too high a price
> to pay for nice-looking text :-(

GTK 2.4 is going to drop core X font support in all probability, so
the choice will vanish soon enough. fontconfig/Xft are the X font
system now.  The old one is deprecated.

There are some optimizations still possible, Owen posted one recently
and the Gnumeric guys are working on it. It depends a good bit on your
X server too (without render it's slower historically but faster than
render with Owen's patch, there's a specific nvidia X server that
makes things super-duper-slow, etc.) And of course you can turn AA off
and on with fontconfig, if you turn it off things are faster as you
don't need to do the compositing.

In part though properly handling Unicode text (or even ASCII text
including things like ligatures) is inherently slower than simply
mapping one character to one glyph and dropping the glyphs on the
screen, so it will probably always be slightly slower, simply because
it is now correct (actually drawing the right thing) while before it
was not. Drawing text improperly isn't really a legitimate
optimization.  So this does mean that some code that used to be "brute
force" now won't be fast enough, and clever optimizations will be
needed in both GTK and apps.

Of course, a grid-based widget such as Scintilla or VTE is sort of a
special case, using Xft directly as VTE does may make sense for
Scintilla. But if you do that you have to be careful to handle
double-width characters properly and that sort of thing.

Also be sure Scintilla isn't doing anything really easily fixable,
like keeping a PangoLayout around permanently for every line, or
computing them all at once, or (some people have done this) using a
PangoLayout for every character cell.

Havoc



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