Package: pango

Function pango-font-description-variations

Lambda List

pango-font-description-variations (desc)

Syntax

(pango-font-description-variations desc) => variations
(setf (pango-font-description-variations desc) variations)

Arguments

desc -- a pango-font-description instance
variations -- a string representing the variations

Details

Accessor of the variations field for the font description.

The function pango-font-description-variations gets the variations field of a font description. The function (setf pango-font-description-variations) sets the variations field. OpenType font variations allow to select a font instance by specifying values for a number of axes, such as width or weight.

The format of the variations string is AXIS1=VALUE,AXIS2=VALUE..., with each AXIS a 4 character tag that identifies a font axis, and each VALUE a floating point number. Unknown axes are ignored, and values are clamped to their allowed range.

Pango does not currently have a way to find supported axes of a font. Both the HarfBuzz or FreeType libraries have API for this.

Since 1.42
 

See also

2021-1-7