Gtk.Widget.prototype.get_pango_context

function get_pango_context():Pango.Context {
    // Gjs wrapper for gtk_widget_get_pango_context()
}

Gets a Pango.Context with the appropriate font map, font description, and base direction for this widget. Unlike the context returned by Gtk.Widget.prototype.create_pango_context, this context is owned by the widget (it can be used until the screen for the widget changes or the widget is removed from its toplevel), and will be updated to match any changes to the widget's attributes. This can be tracked by using the Gtk.screen-changed signal on the widget.

Returns

the Pango.Context for the widget.