Gtk.Widget.create_pango_layout

### Method

# Gtk Widgetcreate_pango_layout

#### Declaration [src]

    PangoLayout*
    gtk_widget_create_pango_layout (
      GtkWidget* widget,
      const char* text
    )

#### Description [src]

Creates a new `PangoLayout` that is configured for the widget.

The `PangoLayout` will have the appropriate font map, font description, and base direction set.

If you keep a `PangoLayout` created in this way around, you need to re-create it when the widgets `PangoContext` is replaced. This can be tracked by listening to changes of the `GtkWidget:root` property on the widget.

#### Parameters

`text`

  Type: `const char*`

  Text to set on the layout.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `PangoLayout`

The new `PangoLayout`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.