jpayne@68: jpayne@68: jpayne@68:
jpayne@68: jpayne@68:jpayne@68: Top jpayne@68: | jpayne@68:![]() |
jpayne@68: ![]() |
jpayne@68: ![]() |
jpayne@68: ![]() |
jpayne@68:
jpayne@68: cairo_font_face_tjpayne@68:cairo_font_face_t — Base class for font faces jpayne@68: |
jpayne@68: jpayne@68: |
jpayne@68: cairo_font_face_t * jpayne@68: | jpayne@68:jpayne@68: cairo_font_face_reference () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_font_face_destroy () jpayne@68: | jpayne@68:
jpayne@68: cairo_status_t jpayne@68: | jpayne@68:jpayne@68: cairo_font_face_status () jpayne@68: | jpayne@68:
jpayne@68: cairo_font_type_t jpayne@68: | jpayne@68:jpayne@68: cairo_font_face_get_type () jpayne@68: | jpayne@68:
unsigned int jpayne@68: | jpayne@68:jpayne@68: cairo_font_face_get_reference_count () jpayne@68: | jpayne@68:
jpayne@68: cairo_status_t jpayne@68: | jpayne@68:jpayne@68: cairo_font_face_set_user_data () jpayne@68: | jpayne@68:
jpayne@68: void * jpayne@68: | jpayne@68:jpayne@68: cairo_font_face_get_user_data () jpayne@68: | jpayne@68:
typedef | jpayne@68:cairo_font_face_t | jpayne@68:
enum | jpayne@68:cairo_font_type_t | jpayne@68:
cairo_font_face_t represents a particular font at a particular weight, jpayne@68: slant, and other characteristic but no size, transformation, or size.
jpayne@68:Font faces are created using font-backend-specific
jpayne@68: constructors, typically of the form
jpayne@68: cairo_backend_font_face_create()
,
jpayne@68: or implicitly using the toy text API by way of
jpayne@68: cairo_select_font_face()
. The resulting face can be accessed using
jpayne@68: cairo_get_font_face()
.
cairo_font_face_t *
jpayne@68: cairo_font_face_reference (cairo_font_face_t *font_face
);
jpayne@68: Increases the reference count on font_face
jpayne@68: by one. This prevents
jpayne@68: font_face
jpayne@68: from being destroyed until a matching call to
jpayne@68: cairo_font_face_destroy()
is made.
Use cairo_font_face_get_reference_count()
to get the number of
jpayne@68: references to a cairo_font_face_t.
font_face |
jpayne@68: a cairo_font_face_t, (may be |
jpayne@68: jpayne@68: |
Since: 1.0
jpayne@68:void
jpayne@68: cairo_font_face_destroy (cairo_font_face_t *font_face
);
jpayne@68: Decreases the reference count on font_face
jpayne@68: by one. If the result
jpayne@68: is zero, then font_face
jpayne@68: and all associated resources are freed.
jpayne@68: See cairo_font_face_reference()
.
font_face |
jpayne@68: jpayne@68: | jpayne@68: |
Since: 1.0
jpayne@68:cairo_status_t
jpayne@68: cairo_font_face_status (cairo_font_face_t *font_face
);
jpayne@68: Checks whether an error has previously occurred for this jpayne@68: font face
jpayne@68:font_face |
jpayne@68: jpayne@68: | jpayne@68: |
CAIRO_STATUS_SUCCESS
or another error such as
jpayne@68: CAIRO_STATUS_NO_MEMORY
.
Since: 1.0
jpayne@68:cairo_font_type_t
jpayne@68: cairo_font_face_get_type (cairo_font_face_t *font_face
);
jpayne@68: This function returns the type of the backend used to create jpayne@68: a font face. See cairo_font_type_t for available types.
jpayne@68:font_face |
jpayne@68: a font face |
jpayne@68: jpayne@68: |
Since: 1.2
jpayne@68:unsigned int
jpayne@68: cairo_font_face_get_reference_count (cairo_font_face_t *font_face
);
jpayne@68: Returns the current reference count of font_face
jpayne@68: .
font_face |
jpayne@68: jpayne@68: | jpayne@68: |
the current reference count of font_face
jpayne@68: . If the
jpayne@68: object is a nil object, 0 will be returned.
Since: 1.4
jpayne@68:cairo_status_t jpayne@68: cairo_font_face_set_user_data (jpayne@68:cairo_font_face_t *font_face
, jpayne@68:const cairo_user_data_key_t *key
, jpayne@68:void *user_data
, jpayne@68:cairo_destroy_func_t destroy
);
Attach user data to font_face
jpayne@68: . To remove user data from a font face,
jpayne@68: call this function with the key that was used to set it and NULL
jpayne@68: for data
jpayne@68: .
font_face |
jpayne@68: jpayne@68: | jpayne@68: |
key |
jpayne@68: the address of a cairo_user_data_key_t to attach the user data to |
jpayne@68: jpayne@68: |
user_data |
jpayne@68: the user data to attach to the font face |
jpayne@68: jpayne@68: |
destroy |
jpayne@68: a cairo_destroy_func_t which will be called when the jpayne@68: font face is destroyed or when new user data is attached using the jpayne@68: same key. |
jpayne@68: jpayne@68: |
CAIRO_STATUS_SUCCESS
or CAIRO_STATUS_NO_MEMORY
if a
jpayne@68: slot could not be allocated for the user data.
Since: 1.0
jpayne@68:void * jpayne@68: cairo_font_face_get_user_data (jpayne@68:cairo_font_face_t *font_face
, jpayne@68:const cairo_user_data_key_t *key
);
Return user data previously attached to font_face
jpayne@68: using the specified
jpayne@68: key. If no user data has been attached with the given key this
jpayne@68: function returns NULL
.
font_face |
jpayne@68: jpayne@68: | jpayne@68: |
key |
jpayne@68: the address of the cairo_user_data_key_t the user data was jpayne@68: attached to |
jpayne@68: jpayne@68: |
Since: 1.0
jpayne@68:typedef struct _cairo_font_face cairo_font_face_t; jpayne@68:jpayne@68:
A cairo_font_face_t specifies all aspects of a font other
jpayne@68: than the size or font matrix (a font matrix is used to distort
jpayne@68: a font by shearing it or scaling it unequally in the two
jpayne@68: directions) . A font face can be set on a cairo_t by using
jpayne@68: cairo_set_font_face()
; the size and font matrix are set with
jpayne@68: cairo_set_font_size()
and cairo_set_font_matrix()
.
There are various types of font faces, depending on the
jpayne@68: font backend they use. The type of a
jpayne@68: font face can be queried using cairo_font_face_get_type()
.
Memory management of cairo_font_face_t is done with
jpayne@68: cairo_font_face_reference()
and cairo_font_face_destroy()
.
Since: 1.0
jpayne@68:cairo_font_type_t is used to describe the type of a given font jpayne@68: face or scaled font. The font types are also known as "font jpayne@68: backends" within cairo.
jpayne@68:The type of a font face is determined by the function used to
jpayne@68: create it, which will generally be of the form
jpayne@68: cairo_type_font_face_create()
.
jpayne@68: 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 jpayne@68: of any type.
jpayne@68:The type of a scaled font is determined by the type of the font
jpayne@68: face passed to cairo_scaled_font_create()
. The scaled font type can
jpayne@68: be queried with cairo_scaled_font_get_type()
The various cairo_scaled_font_t functions can be used with scaled
jpayne@68: fonts of any type, but some font backends also provide
jpayne@68: type-specific functions that must only be called with a scaled font
jpayne@68: of the appropriate type. These functions have names that begin with
jpayne@68: cairo_type_scaled_font()
jpayne@68: such as cairo_ft_scaled_font_lock_face()
.
The behavior of calling a type-specific function with a scaled font jpayne@68: of the wrong type is undefined.
jpayne@68:New entries may be added in future versions.
jpayne@68:jpayne@68: |
jpayne@68: The font was created using cairo's toy font api (Since: 1.2) jpayne@68: |
jpayne@68: jpayne@68: |
jpayne@68: |
jpayne@68: The font is of type FreeType (Since: 1.2) jpayne@68: |
jpayne@68: jpayne@68: |
jpayne@68: |
jpayne@68: The font is of type Win32 (Since: 1.2) jpayne@68: |
jpayne@68: jpayne@68: |
jpayne@68: |
jpayne@68: The font is of type Quartz (Since: 1.6, in 1.2 and jpayne@68: 1.4 it was named CAIRO_FONT_TYPE_ATSUI) jpayne@68: |
jpayne@68: jpayne@68: |
jpayne@68: |
jpayne@68: The font was create using cairo's user font api (Since: 1.8) jpayne@68: |
jpayne@68: jpayne@68: |
Since: 1.2
jpayne@68: