gravity = pcontext:GetGravity()
This is similar to pcontext:GetBaseGravity(), except for when the base gravity is #PANGO_GRAVITY_AUTO for which pango.GravityForMatrix() is used to return the gravity from the current context matrix.
#PANGO_GRAVITY_AUTO