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


We've looked at the widget and graphics API again and we believe that
the correct representation for a SWT Font is a PangoFontDescription.

Welcome Silenio Quarti to the GTK effort!  He will be investigating this
approach (again) in the GTK stream.



Havoc Pennington <hp@xxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

03/13/02 08:19 PM
Please respond to platform-swt-dev

       
        To:        platform-swt-dev@xxxxxxxxxxx
        cc:        
        Subject:        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

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top