[cairo.font_face.FontFace.destroy] when you are done using it.
toyFontFaceCreate
fn
cairo.font_face.FontFace toyFontFaceCreate(string family, cairo.types.FontSlant slant, cairo.types.FontWeight weight)Creates a font face from a triplet of family, slant, and weight. These font faces are used in implementation of the #cairo_t "toy" font API.
If family is the zero-length string "", the platform-specific default family is assumed. The default family then can be queried using [cairo.global.toyFontFaceGetFamily].
The [cairo.context.Context.selectFontFace] function uses this to create font faces. See that function for limitations and other details of toy font faces.
Parameters
family | a font family name, encoded in UTF-8 |
slant | the slant for the font |
weight | the weight for the font |
Returns
a newly created #cairo_font_face_t. Free with