Pango.GlyphItem.apply_attrs

### Method

# Pango GlyphItemapply_attrs

#### Declaration [src]

    GSList*
    pango_glyph_item_apply_attrs (
      PangoGlyphItem* glyph_item,
      const char* text,
      PangoAttrList* list
    )

#### Description [src]

Splits a shaped item (`PangoGlyphItem`) into multiple items based on an attribute list.

The idea is that if you have attributes that don’t affect shaping, such as color or underline, to avoid affecting shaping, you filter them out (`pango_attr_list_filter()`), apply the shaping process and then reapply them to the result using this function.

All attributes that start or end inside a cluster are applied to that cluster; for instance, if half of a cluster is underlined and the other-half strikethrough, then the cluster will end up with both underline and strikethrough attributes. In these cases, it may happen that `item`->extra_attrs for some of the result items can have multiple attributes of the same type.

This function takes ownership of `glyph_item`; it will be reused as one of the elements in the list.

Available since: | 1.2

#### Parameters

`text` | `const char*`
| Text that `list` applies to.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`list` | `PangoAttrList`
| A `PangoAttrList`
| The data is owned by the caller of the function.

#### Return value

Returns: | A list of `None`
| A list of glyph items resulting from splitting `glyph_item`. Free the elements using `pango_glyph_item_free()`, the list using g_slist_free().
| The caller of the method takes ownership of the data, and is responsible for freeing it.