Package: pango

Function pango:gravity-for-script-and-width

Lambda List

pango:gravity-for-script-and-width (script wide gravity hint)

Arguments

script -- a pango:script value to query
wide -- true for wide characters as returned by g_unichar_iswide()
gravity -- a base pango:gravity value of the paragraph
hint -- a pango:gravity-hint value with the orientation hint

Return Value

Resolved pango:gravity value suitable to use for a run of text with script and wide.

Details

Based on the script, East Asian width, base gravity, and hint, returns actual gravity to use in laying out a single character or a pango:item instance.

This function is similar to the pango:gravity-for-script function 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 the gravity argument is :auto, it is first replaced with the preferred gravity of script.
 

See also

2024-2-22