<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,
auto only can be passed to context:set-base-gravity and can only be returned by
context:get-base-gravity.
See also: <PangoGravityHint>
southGlyphs stand upright (default)
eastGlyphs are rotated 90 degrees counter-clockwise.
northGlyphs are upside-down.
westGlyphs are rotated 90 degrees clockwise.
autoGravity is resolved from the context matrix
Finds the gravity that best matches the rotation component in a
<PangoMatrix>.
Passed, or left out: a <PangoMatrix>, or #f.
Returned: a <PangoGravity>.
the gravity of matrix, which will never be
auto, or south if
matrix is #f
Returns the gravity to use in laying out a
<PangoItem>.
The gravity is determined based on the script, base gravity, and hint.
If base-gravity is auto, it is first
replaced with the preferred gravity of script. To get the
preferred gravity of a script, pass auto and
strong in.
Passed: a <PangoScript>, or one of its symbols.
<PangoScript> to query
Passed: a <PangoGravity>, or one of its symbols.
base gravity of the paragraph
Passed: a <PangoGravityHint>, or one of its
symbols.
orientation hint
Returned: a <PangoGravity>.
resolved gravity suitable to use for a run of text with script
Returns the gravity to use in laying out a single character or
<PangoItem>.
The gravity is determined based on the script, East Asian width, base gravity, and hint,
This function is similar to gravity:get-for-script except that this function makes
a distinction between narrow/half-width and wide/full-width characters
also. Wide/full-width characters always stand upright, that is,
they always take the base gravity, whereas narrow/full-width characters
are always rotated in vertical context.
If base-gravity is auto, it is first
replaced with the preferred gravity of script.
Passed: a <PangoScript>, or one of its symbols.
<PangoScript> to query
Passed: a boolean.
#t for wide characters as returned by
unichar-iswide?
Passed: a <PangoGravity>, or one of its symbols.
base gravity of the paragraph
Passed: a <PangoGravityHint>, or one of its
symbols.
orientation hint
Returned: a <PangoGravity>.
resolved gravity suitable to use for a run of text with script and wide.
Converts a <PangoGravity> value to its natural
rotation in radians.
Note that matrix:rotate takes angle in
degrees, not radians. So, to call [method@Pango.Matrix,rotate] with
the output of this function you should multiply it by (180. / G_PI).
Passed: a <PangoGravity>, or one of its symbols.
gravity to query, should not be auto
Returned: a real number.
the rotation value corresponding to gravity.