Name
pango.GravityForScript -- get gravity for script
Synopsis
gravity = pango.GravityForScript(script, base_gravity, hint)
Function
Returns the gravity to use in laying out a Pango item. The gravity is determined based on the script, base gravity, and hint.

If base_gravity is #PANGO_GRAVITY_AUTO, it is first replaced with the preferred gravity of script. To get the preferred gravity of a script, pass #PANGO_GRAVITY_AUTO and #PANGO_GRAVITY_HINT_STRONG in.

This function returns resolved gravity suitable to use for a run of text with script.

See pcontext:SetBaseGravity() for a list of gravity constants. See pcontext:SetGravityHint() for a list of gravity hints. See planguage:GetScripts() for a list of scripts.

Inputs
script
the Pango script to query
base_gravity
base gravity of the paragraph
hint
orientation hint
Results
gravity
resolved gravity suitable to use for a run of text

Show TOC