Widget.createPangoLayout

pango.layout.Layout createPangoLayout(string text = null)

Creates a new [pango.layout.Layout] with the appropriate font map, font description, and base direction for drawing text for this widget.

If you keep a [pango.layout.Layout] created in this way around, you need to re-create it when the widget [pango.context.Context] is replaced. This can be tracked by listening to changes of the [gtk.widget.Widget.root] property on the widget.

Parameters

texttext to set on the layout

Returns

the new [pango.layout.Layout]