### Enumeration

# PangoGravity

since: 1.16

#### Declaration

    enum Pango.Gravity

#### Description [src]

`PangoGravity` represents the orientation of glyphs in a segment of text.

This is useful when rendering vertical text layouts. In those situations, the layout is rotated using a non-identity `PangoMatrix`, and then glyph orientation is controlled using `PangoGravity`.

Not every value in this enumeration makes sense for every usage of `PangoGravity`; for example, `PANGO_GRAVITY_AUTO` only can be passed to `pango_context_set_base_gravity()` and can only be returned by `pango_context_get_base_gravity()`.

See also: `PangoGravityHint`

Available since: 1.16

#### Members

`PANGO_GRAVITY_SOUTH`

  Glyphs stand upright (default)

  - Value: `0`
  - Nickname: `south`
  - Available since: 1.16
`PANGO_GRAVITY_EAST`

  Glyphs are rotated 90 degrees counter-clockwise.

  - Value: `1`
  - Nickname: `east`
  - Available since: 1.16
`PANGO_GRAVITY_NORTH`

  Glyphs are upside-down.

  - Value: `2`
  - Nickname: `north`
  - Available since: 1.16
`PANGO_GRAVITY_WEST`

  Glyphs are rotated 90 degrees clockwise.

  - Value: `3`
  - Nickname: `west`
  - Available since: 1.16
`PANGO_GRAVITY_AUTO`

  Gravity is resolved from the context matrix.

  - Value: `4`
  - Nickname: `auto`
  - Available since: 1.16

#### Type functions

###### pango_gravity_get_for_matrix

Finds the gravity that best matches the rotation component in a `PangoMatrix`.

since: 1.16

###### pango_gravity_get_for_script

Returns the gravity to use in laying out a `PangoItem`.

since: 1.16

###### pango_gravity_get_for_script_and_width

Returns the gravity to use in laying out a single character or `PangoItem`.

since: 1.26

###### pango_gravity_to_rotation

Converts a `PangoGravity` value to its natural rotation in radians.

since: 1.16