Name
cairo.ToyFontFace -- create toy font face
Synopsis
font = cairo.ToyFontFace(family$, slant, weight)
Function
Creates a font face from a triplet of family$, slant, and weight. These font faces are used in implementation of the Cairo context "toy" font API.

The slant parameter can be one of the following constants:

 
#CAIRO_FONT_SLANT_NORMAL
#CAIRO_FONT_SLANT_ITALIC
#CAIRO_FONT_SLANT_OBLIQUE

The weight parameter can be one of the following constants:

 
#CAIRO_FONT_WEIGHT_NORMAL
#CAIRO_FONT_WEIGHT_BOLD

If family$ is the zero-length string "", the platform-specific default family is assumed. The default family then can be queried using cfontface:GetFamily().

The ccontext:SelectFontFace() function uses this to create font faces. See that function for limitations and other details of toy font faces.

This function returns a newly created Cairo font face. Free with cfontface:Free() when you are done using it.

Inputs
family$
a font family name
slant
the slant for the font (see above)
weight
the weight for the font (see above)
Results
font
a newly created Cairo font face

Show TOC