Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Changes to GTK Font

Boris_Shingarov@xxxxxxx writes:
> Stick with GdkFonts... hmm.  Maybe I missed some really important stuff, 
> but I can't find a way to implement our API on top of the GdkFont API... 
> like listing the fonts by certain criteria, or getting the name - in the 
> 1.2 codebase, I use private fields to get to these... and even make X 
> calls (to get the lists).

Another option is to just use Xlib directly, more or less use the
Motif implementation.

The problem is that (as far as I can tell) your current font API, like
the traditional Xlib API, expects a 1<->1 mapping between characters
and glyphs, expects glyphs to be in the same order as the characters
corresponding to them, expects to be able to get the glyph for a
character without having the context of surrounding characters,
etc. etc.

pango_shape() will break these assumptions, and in determining how to
do so, will be a lot slower than Eclipse code is probably expecting a
drawString() sort of operation to be. Thus the PangoLayout sort of
object that caches the computed shaped text.

We need to add
pango_shape_which_does_not_work_for_many_languages_but_maintains_old_assumptions_and_is_fast()
in GTK 2.2. At least that's my current thought. 2.2 is supposed to
come in 2-3 months.

Havoc



Back to the top