w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

cairo-scaled-font.c File Reference
Include dependency graph for cairo-scaled-font.c:

Go to the source code of this file.

Classes

struct  _cairo_scaled_glyph_page
 
struct  _cairo_scaled_font_map
 

Macros

#define MAX_GLYPH_PAGES_CACHED   512
 
#define CAIRO_SCALED_GLYPH_PAGE_SIZE   32
 
#define ZOMBIE   0
 
#define CAIRO_SCALED_FONT_MAX_HOLDOVERS   256
 
#define FNV_32_PRIME   ((uint32_t)0x01000193)
 
#define FNV1_32_INIT   ((uint32_t)0x811c9dc5)
 
#define GLYPH_LUT_SIZE   64
 
#define CACHING_THRESHOLD   16
 

Typedefs

typedef struct _cairo_scaled_font_map cairo_scaled_font_map_t
 

Functions

static size_t _cairo_scaled_font_compute_hash (cairo_scaled_font_t *scaled_font)
 
static void _cairo_scaled_font_fini_internal (cairo_scaled_font_t *scaled_font)
 
static void _cairo_scaled_glyph_fini (cairo_scaled_font_t *scaled_font, cairo_scaled_glyph_t *scaled_glyph)
 
cairo_status_t _cairo_scaled_font_set_error (cairo_scaled_font_t *scaled_font, cairo_status_t status)
 
cairo_font_type_t cairo_scaled_font_get_type (cairo_scaled_font_t *scaled_font)
 
cairo_status_t cairo_scaled_font_status (cairo_scaled_font_t *scaled_font)
 
int _cairo_dummy_prototype (void)
 
static int _cairo_scaled_font_keys_equal (const void *abstract_key_a, const void *abstract_key_b)
 
static cairo_scaled_font_map_t_cairo_scaled_font_map_lock (void)
 
static void _cairo_scaled_font_map_unlock (void)
 
void _cairo_scaled_font_map_destroy (void)
 
static void _cairo_scaled_glyph_page_destroy (cairo_scaled_font_t *scaled_font, cairo_scaled_glyph_page_t *page)
 
static void _cairo_scaled_glyph_page_pluck (void *closure)
 
cairo_status_t _cairo_scaled_font_register_placeholder_and_unlock_font_map (cairo_scaled_font_t *scaled_font)
 
void _cairo_scaled_font_unregister_placeholder_and_lock_font_map (cairo_scaled_font_t *scaled_font)
 
static void _cairo_scaled_font_placeholder_wait_for_creation_to_finish (cairo_scaled_font_t *placeholder_scaled_font)
 
static uint32_t _hash_matrix_fnv (const cairo_matrix_t *matrix, uint32_t hval)
 
static size_t _hash_mix_bits (size_t hash)
 
static void _cairo_scaled_font_init_key (cairo_scaled_font_t *scaled_font, cairo_font_face_t *font_face, const cairo_matrix_t *font_matrix, const cairo_matrix_t *ctm, const cairo_font_options_t *options)
 
static cairo_bool_t _cairo_scaled_font_matches (const cairo_scaled_font_t *scaled_font, const cairo_font_face_t *font_face, const cairo_matrix_t *font_matrix, const cairo_matrix_t *ctm, const cairo_font_options_t *options)
 
cairo_status_t _cairo_scaled_font_init (cairo_scaled_font_t *scaled_font, cairo_font_face_t *font_face, const cairo_matrix_t *font_matrix, const cairo_matrix_t *ctm, const cairo_font_options_t *options, const cairo_scaled_font_backend_t *backend)
 
void _cairo_scaled_font_freeze_cache (cairo_scaled_font_t *scaled_font)
 
void _cairo_scaled_font_thaw_cache (cairo_scaled_font_t *scaled_font)
 
void _cairo_scaled_font_reset_cache (cairo_scaled_font_t *scaled_font)
 
cairo_status_t _cairo_scaled_font_set_metrics (cairo_scaled_font_t *scaled_font, cairo_font_extents_t *fs_metrics)
 
void _cairo_scaled_font_fini (cairo_scaled_font_t *scaled_font)
 
void _cairo_scaled_font_attach_private (cairo_scaled_font_t *scaled_font, cairo_scaled_font_private_t *private, const void *key, void(*destroy)(cairo_scaled_font_private_t *, cairo_scaled_font_t *))
 
cairo_scaled_font_private_t_cairo_scaled_font_find_private (cairo_scaled_font_t *scaled_font, const void *key)
 
void _cairo_scaled_glyph_attach_private (cairo_scaled_glyph_t *scaled_glyph, cairo_scaled_glyph_private_t *private, const void *key, void(*destroy)(cairo_scaled_glyph_private_t *, cairo_scaled_glyph_t *, cairo_scaled_font_t *))
 
cairo_scaled_glyph_private_t_cairo_scaled_glyph_find_private (cairo_scaled_glyph_t *scaled_glyph, const void *key)
 
cairo_scaled_font_tcairo_scaled_font_create (cairo_font_face_t *font_face, const cairo_matrix_t *font_matrix, const cairo_matrix_t *ctm, const cairo_font_options_t *options)
 
cairo_scaled_font_t_cairo_scaled_font_create_in_error (cairo_status_t status)
 
void _cairo_scaled_font_reset_static_data (void)
 
cairo_scaled_font_tcairo_scaled_font_reference (cairo_scaled_font_t *scaled_font)
 
void cairo_scaled_font_destroy (cairo_scaled_font_t *scaled_font)
 
unsigned int cairo_scaled_font_get_reference_count (cairo_scaled_font_t *scaled_font)
 
voidcairo_scaled_font_get_user_data (cairo_scaled_font_t *scaled_font, const cairo_user_data_key_t *key)
 
cairo_status_t cairo_scaled_font_set_user_data (cairo_scaled_font_t *scaled_font, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy)
 
void cairo_scaled_font_extents (cairo_scaled_font_t *scaled_font, cairo_font_extents_t *extents)
 
void cairo_scaled_font_text_extents (cairo_scaled_font_t *scaled_font, const char *utf8, cairo_text_extents_t *extents)
 
void cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font, const cairo_glyph_t *glyphs, int num_glyphs, cairo_text_extents_t *extents)
 
static cairo_status_t cairo_scaled_font_text_to_glyphs_internal_cached (cairo_scaled_font_t *scaled_font, double x, double y, const char *utf8, cairo_glyph_t *glyphs, cairo_text_cluster_t **clusters, int num_chars)
 
static cairo_status_t cairo_scaled_font_text_to_glyphs_internal_uncached (cairo_scaled_font_t *scaled_font, double x, double y, const char *utf8, cairo_glyph_t *glyphs, cairo_text_cluster_t **clusters, int num_chars)
 
cairo_status_t cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font, double x, double y, const char *utf8, int utf8_len, cairo_glyph_t **glyphs, int *num_glyphs, cairo_text_cluster_t **clusters, int *num_clusters, cairo_text_cluster_flags_t *cluster_flags)
 
static cairo_bool_t _range_contains_glyph (const cairo_box_t *extents, cairo_fixed_t left, cairo_fixed_t top, cairo_fixed_t right, cairo_fixed_t bottom)
 
static cairo_status_t _cairo_scaled_font_single_glyph_device_extents (cairo_scaled_font_t *scaled_font, const cairo_glyph_t *glyph, cairo_rectangle_int_t *extents)
 
cairo_status_t _cairo_scaled_font_glyph_device_extents (cairo_scaled_font_t *scaled_font, const cairo_glyph_t *glyphs, int num_glyphs, cairo_rectangle_int_t *extents, cairo_bool_t *overlap_out)
 
cairo_bool_t _cairo_scaled_font_glyph_approximate_extents (cairo_scaled_font_t *scaled_font, const cairo_glyph_t *glyphs, int num_glyphs, cairo_rectangle_int_t *extents)
 
static cairo_status_t _add_unit_rectangle_to_path (cairo_path_fixed_t *path, cairo_fixed_t x, cairo_fixed_t y)
 
static cairo_status_t _trace_mask_to_path (cairo_image_surface_t *mask, cairo_path_fixed_t *path, double tx, double ty)
 
cairo_status_t _cairo_scaled_font_glyph_path (cairo_scaled_font_t *scaled_font, const cairo_glyph_t *glyphs, int num_glyphs, cairo_path_fixed_t *path)
 
void _cairo_scaled_glyph_set_metrics (cairo_scaled_glyph_t *scaled_glyph, cairo_scaled_font_t *scaled_font, cairo_text_extents_t *fs_metrics)
 
void _cairo_scaled_glyph_set_surface (cairo_scaled_glyph_t *scaled_glyph, cairo_scaled_font_t *scaled_font, cairo_image_surface_t *surface)
 
void _cairo_scaled_glyph_set_path (cairo_scaled_glyph_t *scaled_glyph, cairo_scaled_font_t *scaled_font, cairo_path_fixed_t *path)
 
void _cairo_scaled_glyph_set_recording_surface (cairo_scaled_glyph_t *scaled_glyph, cairo_scaled_font_t *scaled_font, cairo_surface_t *recording_surface)
 
void _cairo_scaled_glyph_set_color_surface (cairo_scaled_glyph_t *scaled_glyph, cairo_scaled_font_t *scaled_font, cairo_image_surface_t *surface)
 
static cairo_bool_t _cairo_scaled_glyph_page_can_remove (const void *closure)
 
static cairo_status_t _cairo_scaled_font_allocate_glyph (cairo_scaled_font_t *scaled_font, cairo_scaled_glyph_t **scaled_glyph)
 
static void _cairo_scaled_font_free_last_glyph (cairo_scaled_font_t *scaled_font, cairo_scaled_glyph_t *scaled_glyph)
 
cairo_int_status_t _cairo_scaled_glyph_lookup (cairo_scaled_font_t *scaled_font, unsigned long index, cairo_scaled_glyph_info_t info, cairo_scaled_glyph_t **scaled_glyph_ret)
 
double _cairo_scaled_font_get_max_scale (cairo_scaled_font_t *scaled_font)
 
cairo_font_face_tcairo_scaled_font_get_font_face (cairo_scaled_font_t *scaled_font)
 
void cairo_scaled_font_get_font_matrix (cairo_scaled_font_t *scaled_font, cairo_matrix_t *font_matrix)
 
void cairo_scaled_font_get_ctm (cairo_scaled_font_t *scaled_font, cairo_matrix_t *ctm)
 
void cairo_scaled_font_get_scale_matrix (cairo_scaled_font_t *scaled_font, cairo_matrix_t *scale_matrix)
 
void cairo_scaled_font_get_font_options (cairo_scaled_font_t *scaled_font, cairo_font_options_t *options)
 
cairo_bool_t _cairo_scaled_font_has_color_glyphs (cairo_scaled_font_t *scaled_font)
 

Variables

static cairo_cache_t cairo_scaled_glyph_page_cache
 
static const cairo_scaled_font_t _cairo_scaled_font_nil
 
static cairo_scaled_font_map_tcairo_scaled_font_map
 
static cairo_scaled_font_t_cairo_scaled_font_nil_objects [CAIRO_STATUS_LAST_STATUS+1]
 

Macro Definition Documentation

◆ CACHING_THRESHOLD

#define CACHING_THRESHOLD   16

cairo_scaled_font_text_to_glyphs: @x: X position to place first glyph @y: Y position to place first glyph @scaled_font: a cairo_scaled_font_t @utf8: a string of text encoded in UTF-8 @utf8_len: length of @utf8 in bytes, or -1 if it is NUL-terminated @glyphs: pointer to array of glyphs to fill @num_glyphs: pointer to number of glyphs @clusters: pointer to array of cluster mapping information to fill, or NULL @num_clusters: pointer to number of clusters, or NULL @cluster_flags: pointer to location to store cluster flags corresponding to the output @clusters, or NULL

Converts UTF-8 text to an array of glyphs, optionally with cluster mapping, that can be used to render later using @scaled_font.

If @glyphs initially points to a non-NULL value, that array is used as a glyph buffer, and @num_glyphs should point to the number of glyph entries available there. If the provided glyph array is too short for the conversion, a new glyph array is allocated using cairo_glyph_allocate() and placed in @glyphs. Upon return, @num_glyphs always contains the number of generated glyphs. If the value @glyphs points to has changed after the call, the user is responsible for freeing the allocated glyph array using cairo_glyph_free(). This may happen even if the provided array was large enough.

If @clusters is not NULL, @num_clusters and @cluster_flags should not be NULL, and cluster mapping will be computed. The semantics of how cluster array allocation works is similar to the glyph array. That is, if @clusters initially points to a non-NULL value, that array is used as a cluster buffer, and @num_clusters should point to the number of cluster entries available there. If the provided cluster array is too short for the conversion, a new cluster array is allocated using cairo_text_cluster_allocate() and placed in @clusters. Upon return, @num_clusters always contains the number of generated clusters. If the value @clusters points at has changed after the call, the user is responsible for freeing the allocated cluster array using cairo_text_cluster_free(). This may happen even if the provided array was large enough.

In the simplest case, @glyphs and @clusters can point to NULL initially and a suitable array will be allocated. In code: <informalexample><programlisting> cairo_status_t status;

cairo_glyph_t *glyphs = NULL; int num_glyphs; cairo_text_cluster_t *clusters = NULL; int num_clusters; cairo_text_cluster_flags_t cluster_flags;

status = cairo_scaled_font_text_to_glyphs (scaled_font, x, y, utf8, utf8_len, &glyphs, &num_glyphs, &clusters, &num_clusters, &cluster_flags);

if (status == CAIRO_STATUS_SUCCESS) { cairo_show_text_glyphs (cr, utf8, utf8_len, glyphs, num_glyphs, clusters, num_clusters, cluster_flags);

cairo_glyph_free (glyphs); cairo_text_cluster_free (clusters); } </programlisting></informalexample>

If no cluster mapping is needed: <informalexample><programlisting> cairo_status_t status;

cairo_glyph_t *glyphs = NULL; int num_glyphs;

status = cairo_scaled_font_text_to_glyphs (scaled_font, x, y, utf8, utf8_len, &glyphs, &num_glyphs, NULL, NULL, NULL);

if (status == CAIRO_STATUS_SUCCESS) { cairo_show_glyphs (cr, glyphs, num_glyphs); cairo_glyph_free (glyphs); } </programlisting></informalexample>

If stack-based glyph and cluster arrays are to be used for small arrays: <informalexample><programlisting> cairo_status_t status;

cairo_glyph_t stack_glyphs[40]; cairo_glyph_t *glyphs = stack_glyphs; int num_glyphs = sizeof (stack_glyphs) / sizeof (stack_glyphs[0]); cairo_text_cluster_t stack_clusters[40]; cairo_text_cluster_t *clusters = stack_clusters; int num_clusters = sizeof (stack_clusters) / sizeof (stack_clusters[0]); cairo_text_cluster_flags_t cluster_flags;

status = cairo_scaled_font_text_to_glyphs (scaled_font, x, y, utf8, utf8_len, &glyphs, &num_glyphs, &clusters, &num_clusters, &cluster_flags);

if (status == CAIRO_STATUS_SUCCESS) { cairo_show_text_glyphs (cr, utf8, utf8_len, glyphs, num_glyphs, clusters, num_clusters, cluster_flags);

if (glyphs != stack_glyphs) cairo_glyph_free (glyphs); if (clusters != stack_clusters) cairo_text_cluster_free (clusters); } </programlisting></informalexample>

For details of how @clusters, @num_clusters, and @cluster_flags map input UTF-8 text to the output glyphs see cairo_show_text_glyphs().

The output values can be readily passed to cairo_show_text_glyphs() cairo_show_glyphs(), or related functions, assuming that the exact same @scaled_font is used for the operation.

Return value: CAIRO_STATUS_SUCCESS upon success, or an error status if the input values are wrong or if conversion failed. If the input values are correct but the conversion failed, the error status is also set on @scaled_font.

Since: 1.8

Definition at line 1949 of file cairo-scaled-font.c.

◆ CAIRO_SCALED_FONT_MAX_HOLDOVERS

#define CAIRO_SCALED_FONT_MAX_HOLDOVERS   256

Definition at line 351 of file cairo-scaled-font.c.

◆ CAIRO_SCALED_GLYPH_PAGE_SIZE

#define CAIRO_SCALED_GLYPH_PAGE_SIZE   32

Definition at line 79 of file cairo-scaled-font.c.

◆ FNV1_32_INIT

#define FNV1_32_INIT   ((uint32_t)0x811c9dc5)

Definition at line 602 of file cairo-scaled-font.c.

◆ FNV_32_PRIME

#define FNV_32_PRIME   ((uint32_t)0x01000193)

Definition at line 601 of file cairo-scaled-font.c.

◆ GLYPH_LUT_SIZE

#define GLYPH_LUT_SIZE   64

Definition at line 1686 of file cairo-scaled-font.c.

◆ MAX_GLYPH_PAGES_CACHED

#define MAX_GLYPH_PAGES_CACHED   512

Definition at line 76 of file cairo-scaled-font.c.

◆ ZOMBIE

#define ZOMBIE   0

Definition at line 226 of file cairo-scaled-font.c.

Typedef Documentation

◆ cairo_scaled_font_map_t

Function Documentation

◆ _add_unit_rectangle_to_path()

◆ _cairo_dummy_prototype()

int _cairo_dummy_prototype ( void  )

◆ _cairo_scaled_font_allocate_glyph()

◆ _cairo_scaled_font_attach_private()

void _cairo_scaled_font_attach_private ( cairo_scaled_font_t scaled_font,
cairo_scaled_font_private_t private,
const void key,
void(*)(cairo_scaled_font_private_t *, cairo_scaled_font_t *)  destroy 
)

Definition at line 919 of file cairo-scaled-font.c.

◆ _cairo_scaled_font_compute_hash()

static size_t _cairo_scaled_font_compute_hash ( cairo_scaled_font_t scaled_font)
static

SECTION:cairo-scaled-font @Title: cairo_scaled_font_t @Short_Description: Font face at particular size and options @See_Also: cairo_font_face_t, cairo_matrix_t, cairo_font_options_t

cairo_scaled_font_t represents a realization of a font face at a particular size and transformation and a certain set of font options.

Definition at line 630 of file cairo-scaled-font.c.

References _hash_matrix_fnv(), _hash_mix_bits(), assert(), cairo_font_options_hash(), _cairo_scaled_font::ctm, FNV1_32_INIT, _cairo_scaled_font::font_matrix, hash, _cairo_scaled_font::options, _cairo_scaled_font::original_font_face, size_t, and ZOMBIE.

Referenced by _cairo_scaled_font_init_key(), _cairo_scaled_font_register_placeholder_and_unlock_font_map(), _cairo_scaled_font_unregister_placeholder_and_lock_font_map(), and cairo_scaled_font_create().

◆ _cairo_scaled_font_create_in_error()

◆ _cairo_scaled_font_find_private()

cairo_scaled_font_private_t* _cairo_scaled_font_find_private ( cairo_scaled_font_t scaled_font,
const void key 
)

Definition at line 931 of file cairo-scaled-font.c.

◆ _cairo_scaled_font_fini()

◆ _cairo_scaled_font_fini_internal()

◆ _cairo_scaled_font_free_last_glyph()

◆ _cairo_scaled_font_freeze_cache()

◆ _cairo_scaled_font_get_max_scale()

double _cairo_scaled_font_get_max_scale ( cairo_scaled_font_t scaled_font)

◆ _cairo_scaled_font_glyph_approximate_extents()

cairo_bool_t _cairo_scaled_font_glyph_approximate_extents ( cairo_scaled_font_t scaled_font,
const cairo_glyph_t glyphs,
int  num_glyphs,
cairo_rectangle_int_t extents 
)

◆ _cairo_scaled_font_glyph_device_extents()

◆ _cairo_scaled_font_glyph_path()

◆ _cairo_scaled_font_has_color_glyphs()

cairo_bool_t _cairo_scaled_font_has_color_glyphs ( cairo_scaled_font_t scaled_font)

Definition at line 3196 of file cairo-scaled-font.c.

◆ _cairo_scaled_font_init()

cairo_status_t _cairo_scaled_font_init ( cairo_scaled_font_t scaled_font,
cairo_font_face_t font_face,
const cairo_matrix_t font_matrix,
const cairo_matrix_t ctm,
const cairo_font_options_t options,
const cairo_scaled_font_backend_t backend 
)

Definition at line 710 of file cairo-scaled-font.c.

References _cairo_error(), _cairo_font_options_init_copy(), _cairo_hash_table_create(), _cairo_matrix_is_scale_0(), _cairo_user_data_array_init(), _cairo_scaled_font::backend, backend, _cairo_scaled_font::cache_frozen, cairo_font_face_reference(), cairo_font_options_status(), cairo_list_init(), cairo_matrix_init(), cairo_matrix_invert(), cairo_matrix_multiply(), CAIRO_MUTEX_INIT, CAIRO_REFERENCE_COUNT_INIT, CAIRO_STATUS_NO_MEMORY, CAIRO_STATUS_SUCCESS, _cairo_scaled_font::ctm, _cairo_scaled_font::dev_privates, fabs, FALSE, _cairo_scaled_font::finished, _cairo_scaled_font::font_face, font_face, _cairo_scaled_font::font_matrix, _cairo_scaled_font::global_cache_frozen, _cairo_scaled_font::glyph_pages, _cairo_scaled_font::glyphs, _cairo_scaled_font::holdover, _cairo_scaled_font::link, MAX, _cairo_scaled_font::max_scale, _cairo_scaled_font::mutex, NULL, _cairo_scaled_font::options, _cairo_scaled_font::original_font_face, _cairo_scaled_font::placeholder, _cairo_scaled_font::ref_count, _cairo_scaled_font::scale, _cairo_scaled_font::scale_inverse, _cairo_scaled_font::status, status, unlikely, _cairo_scaled_font::user_data, _cairo_matrix::x0, _cairo_matrix::xx, _cairo_matrix::xy, _cairo_matrix::y0, _cairo_matrix::yx, and _cairo_matrix::yy.

Referenced by _cairo_ft_font_face_scaled_font_create(), _cairo_quartz_font_face_scaled_font_create(), _cairo_scaled_font_register_placeholder_and_unlock_font_map(), _cairo_user_font_face_scaled_font_create(), and _win32_scaled_font_create().

◆ _cairo_scaled_font_init_key()

◆ _cairo_scaled_font_keys_equal()

◆ _cairo_scaled_font_map_destroy()

◆ _cairo_scaled_font_map_lock()

◆ _cairo_scaled_font_map_unlock()

static void _cairo_scaled_font_map_unlock ( void  )
static

Definition at line 397 of file cairo-scaled-font.c.

References CAIRO_MUTEX_UNLOCK.

Referenced by cairo_scaled_font_create(), and cairo_scaled_font_destroy().

◆ _cairo_scaled_font_matches()

◆ _cairo_scaled_font_placeholder_wait_for_creation_to_finish()

static void _cairo_scaled_font_placeholder_wait_for_creation_to_finish ( cairo_scaled_font_t placeholder_scaled_font)
static

◆ _cairo_scaled_font_register_placeholder_and_unlock_font_map()

◆ _cairo_scaled_font_reset_cache()

◆ _cairo_scaled_font_reset_static_data()

◆ _cairo_scaled_font_set_error()

cairo_status_t _cairo_scaled_font_set_error ( cairo_scaled_font_t scaled_font,
cairo_status_t  status 
)

_cairo_scaled_font_set_error: @scaled_font: a scaled_font @status: a status value indicating an error

Atomically sets scaled_font->status to @status and calls _cairo_error; Does nothing if status is CAIRO_STATUS_SUCCESS.

All assignments of an error status to scaled_font->status should happen through _cairo_scaled_font_set_error(). Note that due to the nature of the atomic operation, it is not safe to call this function on the nil objects.

The purpose of this function is to allow the user to set a breakpoint in _cairo_error() to generate a stack trace for when the user causes cairo to detect an error.

Return value: the error status.

Definition at line 277 of file cairo-scaled-font.c.

References _cairo_error(), _cairo_status_set_error, CAIRO_STATUS_SUCCESS, _cairo_scaled_font::status, and status.

Referenced by _cairo_scaled_font_glyph_device_extents(), _cairo_scaled_font_glyph_path(), _cairo_scaled_font_register_placeholder_and_unlock_font_map(), _cairo_scaled_glyph_lookup(), _cairo_user_ucs4_to_index(), cairo_ft_scaled_font_lock_face(), cairo_scaled_font_glyph_extents(), cairo_scaled_font_text_extents(), cairo_scaled_font_text_to_glyphs(), and ensure_scaled_glyph().

◆ _cairo_scaled_font_set_metrics()

◆ _cairo_scaled_font_single_glyph_device_extents()

◆ _cairo_scaled_font_thaw_cache()

◆ _cairo_scaled_font_unregister_placeholder_and_lock_font_map()

◆ _cairo_scaled_glyph_attach_private()

void _cairo_scaled_glyph_attach_private ( cairo_scaled_glyph_t scaled_glyph,
cairo_scaled_glyph_private_t private,
const void key,
void(*)(cairo_scaled_glyph_private_t *, cairo_scaled_glyph_t *, cairo_scaled_font_t *)  destroy 
)

Definition at line 950 of file cairo-scaled-font.c.

◆ _cairo_scaled_glyph_find_private()

cairo_scaled_glyph_private_t* _cairo_scaled_glyph_find_private ( cairo_scaled_glyph_t scaled_glyph,
const void key 
)

Definition at line 963 of file cairo-scaled-font.c.

◆ _cairo_scaled_glyph_fini()

◆ _cairo_scaled_glyph_lookup()

cairo_int_status_t _cairo_scaled_glyph_lookup ( cairo_scaled_font_t scaled_font,
unsigned long  index,
cairo_scaled_glyph_info_t  info,
cairo_scaled_glyph_t **  scaled_glyph_ret 
)

_cairo_scaled_glyph_lookup: @scaled_font: a cairo_scaled_font_t @index: the glyph to create @info: a cairo_scaled_glyph_info_t marking which portions of the glyph should be filled in. @scaled_glyph_ret: a cairo_scaled_glyph_t where the glyph is returned.

If the desired info is not available, (for example, when trying to get INFO_PATH with a bitmapped font), this function will return CAIRO_INT_STATUS_UNSUPPORTED.

Note: This function must be called with the scaled font frozen, and it must remain frozen for as long as the @scaled_glyph_ret is alive. (If the scaled font was not frozen, then there is no guarantee that the glyph would not be evicted before you tried to access it.) See _cairo_scaled_font_freeze_cache() and _cairo_scaled_font_thaw_cache().

Returns: a glyph with the requested portions filled in. Glyph lookup is cached and glyph will be automatically freed along with the scaled_font so no explicit free is required. @info can be one or more of: CAIRO_SCALED_GLYPH_INFO_METRICS - glyph metrics and bounding box CAIRO_SCALED_GLYPH_INFO_SURFACE - surface holding glyph image CAIRO_SCALED_GLYPH_INFO_PATH - path holding glyph outline in device space

Definition at line 2981 of file cairo-scaled-font.c.

References _cairo_error(), _cairo_hash_table_insert(), _cairo_hash_table_lookup(), _cairo_scaled_font_allocate_glyph(), _cairo_scaled_font_free_last_glyph(), _cairo_scaled_font_set_error(), _cairo_scaled_glyph_set_index, assert(), _cairo_scaled_font::backend, _cairo_scaled_font::cache_frozen, CAIRO_INJECT_FAULT, CAIRO_INT_STATUS_SUCCESS, CAIRO_INT_STATUS_UNSUPPORTED, cairo_list_init(), CAIRO_MUTEX_IS_LOCKED, CAIRO_SCALED_GLYPH_INFO_METRICS, CAIRO_STATUS_NO_MEMORY, CAIRO_STATUS_SUCCESS, _cairo_scaled_glyph::dev_privates, err, _cairo_scaled_font::glyphs, _cairo_scaled_glyph::has_info, _cairo_scaled_glyph::hash_entry, info, memset(), _cairo_scaled_font::mutex, NULL, _cairo_scaled_font_backend::scaled_glyph_init, _cairo_scaled_font::status, status, and unlikely.

Referenced by _cairo_scaled_font_glyph_device_extents(), _cairo_scaled_font_glyph_path(), _cairo_scaled_font_single_glyph_device_extents(), _cairo_scaled_font_subsets_map_glyph(), _cairo_script_surface_show_text_glyphs(), _cairo_sub_font_add_glyph(), _cairo_svg_document_emit_bitmap_glyph_data(), _cairo_svg_document_emit_outline_glyph_data(), _cairo_type3_glyph_surface_analyze_glyph(), _cairo_type3_glyph_surface_emit_fallback_image(), _cairo_type3_glyph_surface_emit_glyph(), _cairo_win32_printing_surface_show_glyphs(), _cairo_win32_scaled_font_type1_text_to_glyphs(), _cairo_xcb_surface_add_glyph(), _cairo_xlib_surface_add_glyph(), _can_composite_glyphs(), _composite_glyphs(), _emit_scaled_glyphs(), cairo_scaled_font_glyph_extents(), cairo_scaled_font_text_to_glyphs_internal_cached(), cairo_scaled_font_text_to_glyphs_internal_uncached(), cairo_type1_font_create_charstring(), composite_glyphs(), composite_glyphs_via_mask(), composite_one_glyph(), ensure_scaled_glyph(), i915_surface_glyphs(), i965_surface_glyphs(), and render_glyphs().

◆ _cairo_scaled_glyph_page_can_remove()

static cairo_bool_t _cairo_scaled_glyph_page_can_remove ( const void closure)
static

Definition at line 2849 of file cairo-scaled-font.c.

References _cairo_scaled_font::cache_frozen.

Referenced by _cairo_scaled_font_allocate_glyph().

◆ _cairo_scaled_glyph_page_destroy()

◆ _cairo_scaled_glyph_page_pluck()

◆ _cairo_scaled_glyph_set_color_surface()

◆ _cairo_scaled_glyph_set_metrics()

◆ _cairo_scaled_glyph_set_path()

◆ _cairo_scaled_glyph_set_recording_surface()

void _cairo_scaled_glyph_set_recording_surface ( cairo_scaled_glyph_t scaled_glyph,
cairo_scaled_font_t scaled_font,
cairo_surface_t recording_surface 
)

◆ _cairo_scaled_glyph_set_surface()

◆ _hash_matrix_fnv()

static uint32_t _hash_matrix_fnv ( const cairo_matrix_t matrix,
uint32_t  hval 
)
static

Definition at line 605 of file cairo-scaled-font.c.

References FNV_32_PRIME, len, and matrix().

Referenced by _cairo_scaled_font_compute_hash().

◆ _hash_mix_bits()

static size_t _hash_mix_bits ( size_t  hash)
static

Definition at line 619 of file cairo-scaled-font.c.

References hash.

Referenced by _cairo_scaled_font_compute_hash().

◆ _range_contains_glyph()

static cairo_bool_t _range_contains_glyph ( const cairo_box_t extents,
cairo_fixed_t  left,
cairo_fixed_t  top,
cairo_fixed_t  right,
cairo_fixed_t  bottom 
)
inlinestatic

Definition at line 2152 of file cairo-scaled-font.c.

References bottom, FALSE, right, and top.

Referenced by _cairo_scaled_font_glyph_device_extents().

◆ _trace_mask_to_path()

static cairo_status_t _trace_mask_to_path ( cairo_image_surface_t mask,
cairo_path_fixed_t path,
double  tx,
double  ty 
)
static

_trace_mask_to_path: @bitmap: An alpha mask (either CAIRO_FORMAT_A1 or CAIRO_FORMAT_A8) @path: An initialized path to hold the result

Given a mask surface, (an alpha image), fill out the provided path so that when filled it would result in something that approximates the mask.

Note: The current tracing code here is extremely primitive. It operates only on an A1 surface, (converting an A8 surface to A1 if necessary), and performs the tracing by drawing a little square around each pixel that is on in the mask. We do not pretend that this is a high-quality result. But we are leaving it up to someone who cares enough about getting a better result to implement something more sophisticated.

Definition at line 2585 of file cairo-scaled-font.c.

References _add_unit_rectangle_to_path(), _cairo_fixed_from_double(), _cairo_fixed_from_int(), _cairo_image_surface_coerce_to_format(), byte_ptr, CAIRO_BITSWAP8_IF_LITTLE_ENDIAN, CAIRO_FORMAT_A1, cairo_surface_destroy(), cairo_surface_get_device_offset(), cols, mask, row, rows, status, unlikely, cordic::x, x0, y, and y0.

Referenced by _cairo_scaled_font_glyph_path().

◆ cairo_scaled_font_create()

cairo_scaled_font_t* cairo_scaled_font_create ( cairo_font_face_t font_face,
const cairo_matrix_t font_matrix,
const cairo_matrix_t ctm,
const cairo_font_options_t options 
)

cairo_scaled_font_create: @font_face: a cairo_font_face_t @font_matrix: font space to user space transformation matrix for the font. In the simplest case of a N point font, this matrix is just a scale by N, but it can also be used to shear the font or stretch it unequally along the two axes. See cairo_set_font_matrix(). @ctm: user to device transformation matrix with which the font will be used. @options: options to use when getting metrics for the font and rendering with it.

Creates a cairo_scaled_font_t object from a font face and matrices that describe the size of the font and the environment in which it will be used.

Return value: a newly created cairo_scaled_font_t. Destroy with cairo_scaled_font_destroy()

Since: 1.0

Definition at line 1004 of file cairo-scaled-font.c.

References _cairo_error(), _cairo_font_face_set_error(), _cairo_hash_table_insert(), _cairo_hash_table_lookup(), _cairo_hash_table_remove(), _cairo_matrix_compute_determinant(), _cairo_reference_count_inc, _cairo_scaled_font_compute_hash(), _cairo_scaled_font_create_in_error(), _cairo_scaled_font_fini_internal(), _cairo_scaled_font_init_key(), _cairo_scaled_font_map_lock(), _cairo_scaled_font_map_unlock(), _cairo_scaled_font_matches(), _cairo_scaled_font_placeholder_wait_for_creation_to_finish(), assert(), cairo_font_face_destroy(), cairo_font_face_reference(), cairo_font_options_status(), CAIRO_REFERENCE_COUNT_HAS_REFERENCE, cairo_scaled_font_destroy(), CAIRO_STATUS_INVALID_MATRIX, CAIRO_STATUS_NO_MEMORY, CAIRO_STATUS_SUCCESS, det(), FALSE, font_face, font_map, free, i, ISFINITE, key, likely, memmove, NULL, sizeof(), status, unlikely, and ZOMBIE.

Referenced by _cairo_gstate_ensure_scaled_font(), _cairo_scaled_font_subsets_map_glyph(), _cairo_surface_wrapper_show_text_glyphs(), _cairo_type3_glyph_surface_show_glyphs(), _cairo_win32_printing_surface_emit_win32_glyphs(), cairo_type1_font_create(), and CairoFont::getSubstitutionCorrection().

◆ cairo_scaled_font_destroy()

void cairo_scaled_font_destroy ( cairo_scaled_font_t scaled_font)

cairo_scaled_font_destroy: @scaled_font: a cairo_scaled_font_t

Decreases the reference count on @font by one. If the result is zero, then @font and all associated resources are freed. See cairo_scaled_font_reference().

Since: 1.0

Definition at line 1310 of file cairo-scaled-font.c.

References _cairo_hash_table_remove(), _cairo_reference_count_dec_and_test, _cairo_scaled_font_fini_internal(), _cairo_scaled_font_map_lock(), _cairo_scaled_font_map_unlock(), assert(), _cairo_scaled_font::cache_frozen, CAIRO_MUTEX_IS_UNLOCKED, CAIRO_REFERENCE_COUNT_HAS_REFERENCE, CAIRO_REFERENCE_COUNT_IS_INVALID, CAIRO_SCALED_FONT_MAX_HOLDOVERS, font_map, free, _cairo_scaled_font::global_cache_frozen, _cairo_hash_entry::hash, _cairo_scaled_font::hash_entry, _cairo_scaled_font::holdover, memmove, NULL, _cairo_scaled_font::placeholder, _cairo_scaled_font::ref_count, sizeof(), TRUE, and ZOMBIE.

Referenced by _cairo_gstate_fini(), _cairo_gstate_unset_scaled_font(), _cairo_pdf_smask_group_destroy(), _cairo_recording_surface_finish(), _cairo_recording_surface_show_text_glyphs(), _cairo_scaled_font_map_destroy(), _cairo_scaled_font_placeholder_wait_for_creation_to_finish(), _cairo_scaled_font_subsets_map_glyph(), _cairo_scaled_font_unregister_placeholder_and_lock_font_map(), _cairo_sub_font_destroy(), _cairo_surface_wrapper_show_text_glyphs(), _cairo_type3_glyph_surface_show_glyphs(), _cairo_win32_printing_surface_emit_win32_glyphs(), cairo_scaled_font_create(), cairo_type1_font_destroy(), and CairoFont::getSubstitutionCorrection().

◆ cairo_scaled_font_extents()

void cairo_scaled_font_extents ( cairo_scaled_font_t scaled_font,
cairo_font_extents_t extents 
)

cairo_scaled_font_extents: @scaled_font: a cairo_scaled_font_t @extents: a cairo_font_extents_t which to store the retrieved extents.

Gets the metrics for a cairo_scaled_font_t.

Since: 1.0

Definition at line 1471 of file cairo-scaled-font.c.

References _cairo_scaled_font::extents, and _cairo_scaled_font::status.

Referenced by _cairo_gstate_get_font_extents(), and _cairo_win32_scaled_font_init_glyph_metrics().

◆ cairo_scaled_font_get_ctm()

void cairo_scaled_font_get_ctm ( cairo_scaled_font_t scaled_font,
cairo_matrix_t ctm 
)

cairo_scaled_font_get_ctm: @scaled_font: a cairo_scaled_font_t @ctm: return value for the CTM

Stores the CTM with which @scaled_font was created into @ctm. Note that the translation offsets (x0, y0) of the CTM are ignored by cairo_scaled_font_create(). So, the matrix this function returns always has 0,0 as x0,y0.

Since: 1.2

Definition at line 3133 of file cairo-scaled-font.c.

References cairo_matrix_init_identity(), _cairo_scaled_font::ctm, and _cairo_scaled_font::status.

Referenced by _emit_scaled_font().

◆ cairo_scaled_font_get_font_face()

cairo_font_face_t* cairo_scaled_font_get_font_face ( cairo_scaled_font_t scaled_font)

cairo_scaled_font_get_font_face: @scaled_font: a cairo_scaled_font_t

Gets the font face that this scaled font uses. This might be the font face passed to cairo_scaled_font_create(), but this does not hold true for all possible cases.

Return value: The cairo_font_face_t with which @scaled_font was created. This object is owned by cairo. To keep a reference to it, you must call cairo_scaled_font_reference().

Since: 1.2

Definition at line 3085 of file cairo-scaled-font.c.

References _cairo_font_face_nil, _cairo_scaled_font::font_face, NULL, _cairo_scaled_font::original_font_face, and _cairo_scaled_font::status.

Referenced by _cairo_scaled_font_subsets_map_glyph(), _init_type3_glyph(), _render_type3_glyph(), cairo_type1_font_create(), and twin_scaled_font_compute_properties().

◆ cairo_scaled_font_get_font_matrix()

void cairo_scaled_font_get_font_matrix ( cairo_scaled_font_t scaled_font,
cairo_matrix_t font_matrix 
)

cairo_scaled_font_get_font_matrix: @scaled_font: a cairo_scaled_font_t @font_matrix: return value for the matrix

Stores the font matrix with which @scaled_font was created into @matrix.

Since: 1.2

Definition at line 3108 of file cairo-scaled-font.c.

References cairo_matrix_init_identity(), _cairo_scaled_font::font_matrix, and _cairo_scaled_font::status.

Referenced by _emit_scaled_font().

◆ cairo_scaled_font_get_font_options()

void cairo_scaled_font_get_font_options ( cairo_scaled_font_t scaled_font,
cairo_font_options_t options 
)

cairo_scaled_font_get_font_options: @scaled_font: a cairo_scaled_font_t @options: return value for the font options

Stores the font options with which @scaled_font was created into @options.

Since: 1.2

Definition at line 3180 of file cairo-scaled-font.c.

References _cairo_font_options_init_copy(), _cairo_font_options_init_default(), cairo_font_options_status(), _cairo_scaled_font::options, and _cairo_scaled_font::status.

Referenced by _emit_scaled_font().

◆ cairo_scaled_font_get_reference_count()

unsigned int cairo_scaled_font_get_reference_count ( cairo_scaled_font_t scaled_font)

cairo_scaled_font_get_reference_count: @scaled_font: a cairo_scaled_font_t

Returns the current reference count of @scaled_font.

Return value: the current reference count of @scaled_font. If the object is a nil object, 0 will be returned.

Since: 1.4

Definition at line 1395 of file cairo-scaled-font.c.

References CAIRO_REFERENCE_COUNT_GET_VALUE, CAIRO_REFERENCE_COUNT_IS_INVALID, NULL, and _cairo_scaled_font::ref_count.

◆ cairo_scaled_font_get_scale_matrix()

void cairo_scaled_font_get_scale_matrix ( cairo_scaled_font_t scaled_font,
cairo_matrix_t scale_matrix 
)

cairo_scaled_font_get_scale_matrix: @scaled_font: a cairo_scaled_font_t @scale_matrix: return value for the matrix

Stores the scale matrix of @scaled_font into @matrix. The scale matrix is product of the font matrix and the ctm associated with the scaled font, and hence is the matrix mapping from font space to device space.

Since: 1.8

Definition at line 3158 of file cairo-scaled-font.c.

References cairo_matrix_init_identity(), _cairo_scaled_font::scale, and _cairo_scaled_font::status.

◆ cairo_scaled_font_get_type()

cairo_font_type_t cairo_scaled_font_get_type ( cairo_scaled_font_t scaled_font)

cairo_scaled_font_get_type: @scaled_font: a cairo_scaled_font_t

This function returns the type of the backend used to create a scaled font. See cairo_font_type_t for available types. However, this function never returns CAIRO_FONT_TYPE_TOY.

Return value: The type of @scaled_font.

Since: 1.2

Definition at line 303 of file cairo-scaled-font.c.

References _cairo_scaled_font::backend, CAIRO_FONT_TYPE_TOY, CAIRO_REFERENCE_COUNT_IS_INVALID, _cairo_scaled_font::ref_count, and _cairo_scaled_font_backend::type.

Referenced by _cairo_win32_printing_surface_show_glyphs(), _cairo_win32_surface_emit_glyphs(), and check_glyphs().

◆ cairo_scaled_font_get_user_data()

void* cairo_scaled_font_get_user_data ( cairo_scaled_font_t scaled_font,
const cairo_user_data_key_t key 
)

cairo_scaled_font_get_user_data: @scaled_font: a cairo_scaled_font_t @key: the address of the cairo_user_data_key_t the user data was attached to

Return user data previously attached to @scaled_font using the specified key. If no user data has been attached with the given key this function returns NULL.

Return value: the user data previously attached or NULL.

Since: 1.4

Definition at line 1419 of file cairo-scaled-font.c.

References _cairo_user_data_array_get_data(), key, and _cairo_scaled_font::user_data.

Referenced by twin_scaled_font_render_glyph().

◆ cairo_scaled_font_glyph_extents()

void cairo_scaled_font_glyph_extents ( cairo_scaled_font_t scaled_font,
const cairo_glyph_t glyphs,
int  num_glyphs,
cairo_text_extents_t extents 
)

cairo_scaled_font_glyph_extents: @scaled_font: a cairo_scaled_font_t @glyphs: an array of glyph IDs with X and Y offsets. @num_glyphs: the number of glyphs in the @glyphs array @extents: a cairo_text_extents_t which to store the retrieved extents.

Gets the extents for an array of glyphs. The extents describe a user-space rectangle that encloses the "inked" portion of the glyphs, (as they would be drawn by cairo_show_glyphs() if the cairo graphics state were set to the same font_face, font_matrix, ctm, and font_options as @scaled_font). Additionally, the x_advance and y_advance values indicate the amount by which the current point would be advanced by cairo_show_glyphs().

Note that whitespace glyphs do not contribute to the size of the rectangle (extents.width and extents.height).

Since: 1.0

Definition at line 1570 of file cairo-scaled-font.c.

References _cairo_error_throw, _cairo_scaled_font_freeze_cache(), _cairo_scaled_font_set_error(), _cairo_scaled_font_thaw_cache(), _cairo_scaled_glyph_lookup(), bottom, CAIRO_SCALED_GLYPH_INFO_METRICS, CAIRO_STATUS_NEGATIVE_COUNT, CAIRO_STATUS_NULL_POINTER, FALSE, glyphs(), cairo_text_extents_t::height, i, _cairo_scaled_glyph::metrics, NULL, right, _cairo_scaled_font::status, status, top, TRUE, unlikely, UNLOCK, visible, cairo_text_extents_t::width, x0, x1, cairo_text_extents_t::x_advance, cairo_text_extents_t::x_bearing, y0, y1, cairo_text_extents_t::y_advance, and cairo_text_extents_t::y_bearing.

Referenced by _cairo_gstate_glyph_extents(), and cairo_scaled_font_text_extents().

◆ cairo_scaled_font_reference()

cairo_scaled_font_t* cairo_scaled_font_reference ( cairo_scaled_font_t scaled_font)

cairo_scaled_font_reference: @scaled_font: a cairo_scaled_font_t, (may be NULL in which case this function does nothing)

Increases the reference count on @scaled_font by one. This prevents @scaled_font from being destroyed until a matching call to cairo_scaled_font_destroy() is made.

Use cairo_scaled_font_get_reference_count() to get the number of references to a cairo_scaled_font_t.

Returns: the referenced cairo_scaled_font_t

Since: 1.0

Definition at line 1285 of file cairo-scaled-font.c.

References _cairo_reference_count_inc, assert(), CAIRO_REFERENCE_COUNT_HAS_REFERENCE, CAIRO_REFERENCE_COUNT_IS_INVALID, NULL, and _cairo_scaled_font::ref_count.

Referenced by _cairo_default_context_set_scaled_font(), _cairo_gstate_init_copy(), _cairo_pdf_surface_show_text_glyphs(), _cairo_recording_surface_copy__glyphs(), _cairo_recording_surface_show_text_glyphs(), _cairo_scaled_font_placeholder_wait_for_creation_to_finish(), and _cairo_scaled_font_subsets_map_glyph().

◆ cairo_scaled_font_set_user_data()

cairo_status_t cairo_scaled_font_set_user_data ( cairo_scaled_font_t scaled_font,
const cairo_user_data_key_t key,
void user_data,
cairo_destroy_func_t  destroy 
)

cairo_scaled_font_set_user_data: @scaled_font: a cairo_scaled_font_t @key: the address of a cairo_user_data_key_t to attach the user data to @user_data: the user data to attach to the cairo_scaled_font_t @destroy: a cairo_destroy_func_t which will be called when the cairo_t is destroyed or when new user data is attached using the same key.

Attach user data to @scaled_font. To remove user data from a surface, call this function with the key that was used to set it and NULL for @data.

Return value: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY if a slot could not be allocated for the user data.

Since: 1.4

Definition at line 1446 of file cairo-scaled-font.c.

References _cairo_user_data_array_set_data(), CAIRO_REFERENCE_COUNT_IS_INVALID, key, _cairo_scaled_font::ref_count, _cairo_scaled_font::status, and _cairo_scaled_font::user_data.

Referenced by twin_scaled_font_compute_properties().

◆ cairo_scaled_font_status()

cairo_status_t cairo_scaled_font_status ( cairo_scaled_font_t scaled_font)

cairo_scaled_font_status: @scaled_font: a cairo_scaled_font_t

Checks whether an error has previously occurred for this scaled_font.

Return value: CAIRO_STATUS_SUCCESS or another error such as CAIRO_STATUS_NO_MEMORY.

Since: 1.0

Definition at line 324 of file cairo-scaled-font.c.

References _cairo_scaled_font::status.

Referenced by _cairo_gstate_ensure_scaled_font(), _cairo_gstate_get_font_extents(), and _cairo_gstate_glyph_extents().

◆ cairo_scaled_font_text_extents()

void cairo_scaled_font_text_extents ( cairo_scaled_font_t scaled_font,
const char *  utf8,
cairo_text_extents_t extents 
)

cairo_scaled_font_text_extents: @scaled_font: a cairo_scaled_font_t @utf8: a NUL-terminated string of text, encoded in UTF-8 @extents: a cairo_text_extents_t which to store the retrieved extents.

Gets the extents for a string of text. The extents describe a user-space rectangle that encloses the "inked" portion of the text drawn at the origin (0,0) (as it would be drawn by cairo_show_text() if the cairo graphics state were set to the same font_face, font_matrix, ctm, and font_options as @scaled_font). Additionally, the x_advance and y_advance values indicate the amount by which the current point would be advanced by cairo_show_text().

Note that whitespace characters do not directly contribute to the size of the rectangle (extents.width and extents.height). They do contribute indirectly by changing the position of non-whitespace characters. In particular, trailing whitespace characters are likely to not affect the size of the rectangle, though they will affect the x_advance and y_advance values.

Since: 1.2

Definition at line 1511 of file cairo-scaled-font.c.

References _cairo_scaled_font_set_error(), cairo_scaled_font_glyph_extents(), cairo_scaled_font_text_to_glyphs(), free, glyphs(), NULL, _cairo_scaled_font::status, status, and unlikely.

Referenced by CairoFont::getSubstitutionCorrection().

◆ cairo_scaled_font_text_to_glyphs()

◆ cairo_scaled_font_text_to_glyphs_internal_cached()

◆ cairo_scaled_font_text_to_glyphs_internal_uncached()

Variable Documentation

◆ _cairo_scaled_font_nil

const cairo_scaled_font_t _cairo_scaled_font_nil
static
Initial value:
= {
{ 0 },
{ ((cairo_atomic_int_t) -1) } ,
{ 0, 0, 0, NULL },
NULL,
NULL,
{ 1., 0., 0., 1., 0, 0},
{ 1., 0., 0., 1., 0, 0},
0 ,
0 ,
1 ,
{ 1., 0., 0., 1., 0, 0},
{ 1., 0., 0., 1., 0, 0},
1.,
{ 0., 0., 0., 0., 0. },
{ 0., 0., 0., 0., 0. },
CAIRO_MUTEX_IMPL_NIL_INITIALIZER ,
NULL,
{ NULL, NULL },
0 ,
0 ,
{ NULL, NULL },
}
cairo_atomic_intptr_t cairo_atomic_int_t
@ CAIRO_SUBPIXEL_ORDER_DEFAULT
Definition: cairo.h:1303
@ CAIRO_STATUS_NO_MEMORY
Definition: cairo.h:317
@ CAIRO_HINT_METRICS_DEFAULT
Definition: cairo.h:1358
@ CAIRO_ANTIALIAS_DEFAULT
Definition: cairo.h:710
@ CAIRO_HINT_STYLE_DEFAULT
Definition: cairo.h:1335
#define NULL
Definition: ftobjs.h:61

Definition at line 227 of file cairo-scaled-font.c.

Referenced by _cairo_scaled_font_create_in_error().

◆ _cairo_scaled_font_nil_objects

cairo_scaled_font_t* _cairo_scaled_font_nil_objects[CAIRO_STATUS_LAST_STATUS+1]
static

◆ cairo_scaled_font_map

◆ cairo_scaled_glyph_page_cache