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

Havoc Pennington <hp@xxxxxxxxxx> writes: 
> 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.

Another thing that might work is to just use pango_shape() for now,
and figure it will be fast enough and maintain the assumptions for the
most common languages.

I don't know specifically what font issues you've been encountering
though. My expectation would be that you draw a string by doing a
pango_shape() then a gdk_draw_glyphs().

Havoc



Back to the top