Re: DrawingArea and Text display.
- From: Havoc Pennington <hp redhat com>
- To: Sven Neumann <sven gimp org>
- Cc: Neil Hodgson <nhodgson bigpond net au>, gtk-list gnome org
- Subject: Re: DrawingArea and Text display.
- Date: Fri, 7 Mar 2003 12:29:02 -0500
On Fri, Mar 07, 2003 at 12:45:51PM +0100, Sven Neumann wrote:
> or slightly simpler and good for multi-line strings as well:
>
> PangoContext *context = gtk_widget_create_pango_context (widget);
> PangoLayout *layout = pango_layout_new (context);
>
> g_object_unref (context);
>
> pango_layout_set_font_description (layout, font_desc);
> pango_layout_set_text (layout, "Some UTF-8 text", -1);
Even better:
layout = gtk_widget_create_pango_layout (drawing_area, "Some text");
pango_layout_set_font_description (layout, font_desc);
Also, be sure to check out the porting docs:
http://developer.gnome.org/dotplan/porting/
http://developer.gnome.org/doc/API/2.0/gtk/gtk-changes-2-0.html
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]