Pango.shape_item
Description: Reference for Pango.shape_item

### Function

# Pangoshape_item

since: 1.50

#### Declaration [src]

    void
    pango_shape_item (
      PangoItem* item,
      const char* paragraph_text,
      int paragraph_length,
      PangoLogAttr* log_attrs,
      PangoGlyphString* glyphs,
      PangoShapeFlags flags
    )

#### Description [src]

Convert the characters in `item` into glyphs.

This is similar to `pango_shape_with_flags()`, except it takes a `PangoItem` instead of separate `item_text` and `analysis` arguments.

It also takes `log_attrs`, which are needed for implementing some aspects of hyphen insertion and text transforms (in particular, capitalization).

Note that the extra attributes in the `analyis` that is returned from `pango_itemize()` have indices that are relative to the entire paragraph, so you do not pass the full paragraph text as `paragraph_text`, you need to subtract the item offset from their indices before calling `pango_shape_with_flags()`.

Available since: 1.50

#### Parameters

`item`

  Type: `PangoItem`

  `PangoItem` to shape.

  The data is owned by the caller of the function.

`paragraph_text`

  Type: `const char*`

  Text of the paragraph (see details).

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

`paragraph_length`

  Type: `int`

  The length (in bytes) of `paragraph_text`. -1 means nul-terminated text.

`log_attrs`

  Type: `PangoLogAttr`

  Array of `PangoLogAttr` for `item`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`glyphs`

  Type: `PangoGlyphString`

  Glyph string in which to store results.

  The argument will be set by the function.
  The returned data is owned by the function.

`flags`

  Type: `PangoShapeFlags`

  Flags influencing the shaping process.