toyFontFaceCreate

fncairo.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

familya font family name, encoded in UTF-8
slantthe slant for the font
weightthe weight for the font

Returns

a newly created #cairo_font_face_t. Free with

[cairo.font_face.FontFace.destroy] when you are done using it.