[ CCode ( cprefix = "PANGO_GRAVITY_" , type_id = "pango_gravity_get_type ()" ) ]
[ Version ( since = "1.16" ) ]
public enum Gravity
The Gravity type 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 Gravity. Not every value in this enumeration makes sense for every usage of
Gravity; for example, AUTO only can be passed to
set_base_gravity and can only be returned by
See also: GravityHint
- AUTO - Gravity is resolved from the context
- EAST - Glyphs are rotated 90 degrees clockwise
- NORTH - Glyphs are upside-down
- SOUTH - Glyphs stand upright (default)
- WEST - Glyphs are rotated 90 degrees
- public static Gravity get_for_matrix (Matrix? matrix)
Finds the gravity that best matches the rotation component in a
- public static Gravity get_for_script (Script script, Gravity base_gravity, GravityHint hint)
Based on the script, base gravity, and hint, returns actual gravity to use
in laying out a single Item.
- public static Gravity get_for_script_and_width (Script script, bool wide, Gravity base_gravity, GravityHint hint)
Based on the script, East Asian width, base gravity, and hint, returns
actual gravity to use in laying out a single character or Item.