PgVertical.gravityGetForScriptAndWidth

Based on the script, East Asian width, base gravity, and hint, returns actual gravity to use in laying out a single character or PangoItem

This function is similar to pango_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 <emphasis>upright</emphasis>, that is, they always take the base gravity, whereas narrow/full-width characters are always rotated in vertical context.

If base_gravity is PANGO_GRAVITY_AUTO, it is first replaced with the preferred gravity of script.

struct PgVertical
static
gravityGetForScriptAndWidth

Parameters

script PangoScript

cairo.Script to query

wide bool

TRUE for wide characters as returned by g_unichar_iswide()

baseGravity PangoGravity

base gravity of the paragraph

hint PangoGravityHint

orientation hint

Return Value

resolved gravity suitable to use for a run of text with script and wide.

Meta

Since

1.26