Re: [scintilla] Pango support on GTK+ 2.x
- From: Havoc Pennington <hp redhat com>
- To: Neil Hodgson <nhodgson bigpond net au>
- Cc: Biswapesh Chattopadhyay <biswapesh_chatterjee tcscal co in>, Scintilla Interest <scintilla-interest lyra org>, GTK Devel <gtk-devel-list gnome org>
- Subject: Re: [scintilla] Pango support on GTK+ 2.x
- Date: Sun, 9 Mar 2003 18:01:52 -0500
On Mon, Mar 10, 2003 at 08:18:28AM +1100, Neil Hodgson wrote:
> # font descriptions already created at style definition time
> gtk_widget_create_pango_context()
> pango_layout_new()
(irrelevant side note, gtk_widget_create_pango_layout() combines those
two steps)
> for each line:
> for each text run in one style:
> gdk_gc_set_foreground()
> pango_layout_set_text()
> pango_layout_set_font_description()
> pango_layout_get_line()
> gdk_draw_layout_line()
> unref layout and context
>
> Possibly it may pay to insert all the runs into one pango layout and then
> render the whole line at once.
I would expect so, you're doing significant extra work per-run by
using separate layouts. Also, for natural-language text (which might
appear in a comment), if you break it into multiple layouts you will
break things. The smallest "atomic" unit of text layout is the
paragraph, you need to have the whole paragraph to avoid losing
context that may be needed. i.e. the rendering of one character can be
affected by surrounding characters.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]