Re: Gnomecanvas/TextItem question



On Monday, January 19, 2004, at 01:18 AM, Chris Debenham - SSA Systems Engineer wrote:

$context = Gtk2::Pango::Context->new();
$context->load_font(Gtk2::Pango::FontDescription->from_string("Sans 24"));

in fact, pango_context_new and pango_context_set_font_map are guarded in their headers by #ifdef PANGO_ENABLE_BACKEND --- they're meant to be used only by Pango backend implementations, and hence are not bound. the "new" you were picking up for Gtk2::Pango::Context actually comes from Glib::Object.

GtkWidget provides front-end functions that create contexts and layouts.

http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget- create-pango-layout http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget- get-pango-context http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget- create-pango-context

e.g.

        $layout = $widget->create_pango_layout ($text);

does that fix it?


--
Brian: If i recall correctly, this is the physics department.
Chris: That explains all that gravity.
        -- Family Guy, "The Story on Page One"




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]