cairo_font_face_t
cairo_font_face_t — Base class for font faces
|
|
Description
cairo_font_face_t represents a particular font at a particular weight,
slant, and other characteristic but no size, transformation, or size.
Font faces are created using font-backend-specific
constructors, typically of the form
cairo_backend_font_face_create(),
or implicitly using the toy text API by way of
cairo_select_font_face(). The resulting face can be accessed using
cairo_get_font_face().
Functions
cairo_font_face_destroy ()
void
cairo_font_face_destroy (cairo_font_face_t *font_face);
Decreases the reference count on font_face
by one. If the result
is zero, then font_face
and all associated resources are freed.
See cairo_font_face_reference().
Since: 1.0
cairo_font_face_status ()
cairo_status_t
cairo_font_face_status (cairo_font_face_t *font_face);
Checks whether an error has previously occurred for this
font face
Since: 1.0
cairo_font_face_get_type ()
cairo_font_type_t
cairo_font_face_get_type (cairo_font_face_t *font_face);
This function returns the type of the backend used to create
a font face. See cairo_font_type_t for available types.
Returns
The type of font_face
.
Since: 1.2
cairo_font_face_get_reference_count ()
unsigned int
cairo_font_face_get_reference_count (cairo_font_face_t *font_face);
Returns the current reference count of font_face
.
Returns
the current reference count of font_face
. If the
object is a nil object, 0 will be returned.
Since: 1.4
cairo_font_face_get_user_data ()
void *
cairo_font_face_get_user_data (cairo_font_face_t *font_face,
const cairo_user_data_key_t *key);
Return user data previously attached to font_face
using the specified
key. If no user data has been attached with the given key this
function returns NULL.
Returns
the user data previously attached or NULL.
Since: 1.0
Types and Values
enum cairo_font_type_t
cairo_font_type_t is used to describe the type of a given font
face or scaled font. The font types are also known as "font
backends" within cairo.
The type of a font face is determined by the function used to
create it, which will generally be of the form
cairo_type_font_face_create().
The font face type can be queried with cairo_font_face_get_type()
The various cairo_font_face_t functions can be used with a font face
of any type.
The type of a scaled font is determined by the type of the font
face passed to cairo_scaled_font_create(). The scaled font type can
be queried with cairo_scaled_font_get_type()
The various cairo_scaled_font_t functions can be used with scaled
fonts of any type, but some font backends also provide
type-specific functions that must only be called with a scaled font
of the appropriate type. These functions have names that begin with
cairo_type_scaled_font()
such as cairo_ft_scaled_font_lock_face().
The behavior of calling a type-specific function with a scaled font
of the wrong type is undefined.
New entries may be added in future versions.
Since: 1.2