Package: pango

Function pango:attr-list-to-string

Lambda List

pango:attr-list-to-string (attrlist)

Arguments

attrlist -- a pango:attr-list instance

Return Value

The string with the serialized attributes.

Details

Serializes a pango-attr-list instance to a string. In the resulting string, serialized attributes are separated by newlines or commas. Individual attributes are serialized to a string of the form
START END TYPE VALUE  
Where START and END are the indices, with -1 being accepted in place of MAXUINT, TYPE is the nickname of the attribute value type, for example weight or stretch, and the value is serialized according to its type:
  • enum values as nick or numeric value
  • boolean values as true or false
  • integers and floats as numbers
  • strings as string, optionally quoted
  • font features as quoted string
  • Pango language as string
  • Pango font description as serialized by the pango:font-description-to-string function
  • pango:color instances as serialized by the pango:color-to-string function
To parse the returned value, use the pango:attr-list-from-string function.

Note that shape attributes can not be serialized.

Examples

0 10 foreground red, 5 15 weight bold, 0 200 font-desc "Sans 10"
0 -1 weight 700
0 100 family Times    
Since 1.50
 

See also

2025-1-1