Pango.AttrList.to_string

### Method

# Pango AttrListto_string

since: 1.50

#### Declaration [src]

    char*
    pango_attr_list_to_string (
      PangoAttrList* list
    )

#### Description [src]

Serializes a `PangoAttrList` to a string.

In the resulting string, serialized attributes are separated by newlines or commas. Individual attributes are serialized to a string of the form

START END TYPE VALUE

Where START and END are the indices (with -1 being accepted in place of MAXUINT), TYPE is the nickname of the attribute value type, e.g. weight or stretch, and the value is serialized according to its type:

- enum values as nick or numeric value
- boolean values as true or false
- integers and floats as numbers
- strings as string, optionally quoted
- font features as quoted string
- PangoLanguage as string
- PangoFontDescription as serialized by `pango_font_description_to_string()`, quoted
- PangoColor as serialized by `pango_color_to_string()`

Examples:

    0 10 foreground red, 5 15 weight bold, 0 200 font-desc "Sans 10"

    0 -1 weight 700
    0 100 family Times

To parse the returned value, use `pango_attr_list_from_string()`.

Note that shape attributes can not be serialized.

Available since: 1.50

#### Return value

Type: `char*`

A newly allocated string.

The caller of the method takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.