Gtk.Widget.prototype.create_pango_layout
function create_pango_layout(text:String):Pango.Layout { // Gjs wrapper for gtk_widget_create_pango_layout() }
Creates a new Pango.Layout with the appropriate font map, font description, and base direction for drawing text for this widget.
If you keep a Pango.Layout created in this way around, you need to re-create it when the widget Pango.Context is replaced. This can be tracked by using the Gtk.screen-changed signal on the widget.
- text
text to set on the layout (can be null)
- Returns
the new Pango.Layout