diff options
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | src/cairo-font.c | 42 | ||||
-rw-r--r-- | src/cairo-ft-font.c | 14 | ||||
-rw-r--r-- | src/cairo-gstate.c | 8 | ||||
-rw-r--r-- | src/cairo-win32-font.c | 14 | ||||
-rw-r--r-- | src/cairoint.h | 30 |
6 files changed, 73 insertions, 54 deletions
@@ -1,5 +1,24 @@ 2005-08-05 Carl Worth <cworth@cworth.org> + * src/cairoint.h: Rename font_face_backend->create_font to + scaled_font_create. Group the scaled_font prototypes together. A + little more simple -> toy renaming. + + * src/cairo-font.c: (_cairo_toy_font_face_create_from_cache_key), + (_cairo_toy_font_face_destroy), + (_cairo_toy_font_face_create): + * src/cairo-gstate.c: (_cairo_gstate_select_font_face), + (_cairo_gstate_ensure_font_face): + A little more simple -> toy renaming. + + * src/cairo-font.c: (_cairo_toy_font_face_scaled_font_create), + (_cairo_inner_font_cache_create_entry): + * src/cairo-ft-font.c: (_cairo_ft_font_face_scaled_font_create): + * src/cairo-win32-font.c: (_cairo_win32_font_face_scaled_font_create): + Track rename of font_face_backend->scaled_font_create. + +2005-08-05 Carl Worth <cworth@cworth.org> + * src/cairoint.h: Rather gratuitous (though mostly harmless) whitespace changes for font backend tables. diff --git a/src/cairo-font.c b/src/cairo-font.c index 2caecc62..10fcb5f5 100644 --- a/src/cairo-font.c +++ b/src/cairo-font.c @@ -42,7 +42,7 @@ /* Forward declare so we can use it as an arbitrary backend for * _cairo_font_face_nil. */ -static const cairo_font_face_backend_t _cairo_simple_font_face_backend; +static const cairo_font_face_backend_t _cairo_toy_font_face_backend; /* cairo_font_face_t */ @@ -50,7 +50,7 @@ const cairo_font_face_t _cairo_font_face_nil = { CAIRO_STATUS_NO_MEMORY, /* status */ -1, /* ref_count */ { 0, 0, 0, NULL }, /* user_data */ - &_cairo_simple_font_face_backend + &_cairo_toy_font_face_backend }; void @@ -296,7 +296,7 @@ _cairo_toy_font_face_create_from_cache_key (cairo_simple_cache_key_t *key) simple_face->slant = key->slant; simple_face->weight = key->weight; - _cairo_font_face_init (&simple_face->base, &_cairo_simple_font_face_backend); + _cairo_font_face_init (&simple_face->base, &_cairo_toy_font_face_backend); return simple_face; } @@ -357,7 +357,7 @@ static const cairo_cache_backend_t _cairo_simple_font_cache_backend = { }; static void -_cairo_simple_font_face_destroy (void *abstract_face) +_cairo_toy_font_face_destroy (void *abstract_face) { cairo_toy_font_face_t *simple_face = abstract_face; cairo_cache_t *cache; @@ -382,11 +382,11 @@ _cairo_simple_font_face_destroy (void *abstract_face) } static cairo_status_t -_cairo_simple_font_face_create_font (void *abstract_face, - const cairo_matrix_t *font_matrix, - const cairo_matrix_t *ctm, - const cairo_font_options_t *options, - cairo_scaled_font_t **scaled_font) +_cairo_toy_font_face_scaled_font_create (void *abstract_face, + const cairo_matrix_t *font_matrix, + const cairo_matrix_t *ctm, + const cairo_font_options_t *options, + cairo_scaled_font_t **scaled_font) { const cairo_scaled_font_backend_t * backend = CAIRO_SCALED_FONT_BACKEND_DEFAULT; @@ -396,13 +396,13 @@ _cairo_simple_font_face_create_font (void *abstract_face, font_matrix, ctm, options, scaled_font); } -static const cairo_font_face_backend_t _cairo_simple_font_face_backend = { - _cairo_simple_font_face_destroy, - _cairo_simple_font_face_create_font, +static const cairo_font_face_backend_t _cairo_toy_font_face_backend = { + _cairo_toy_font_face_destroy, + _cairo_toy_font_face_scaled_font_create }; /** - * _cairo_simple_font_face_create: + * _cairo_toy_font_face_create: * @family: a font family name, encoded in UTF-8 * @slant: the slant for the font * @weight: the weight for the font @@ -415,9 +415,9 @@ static const cairo_font_face_backend_t _cairo_simple_font_face_backend = { * cairo_font_face_destroy() **/ cairo_font_face_t * -_cairo_simple_font_face_create (const char *family, - cairo_font_slant_t slant, - cairo_font_weight_t weight) +_cairo_toy_font_face_create (const char *family, + cairo_font_slant_t slant, + cairo_font_weight_t weight) { cairo_simple_cache_entry_t *entry; cairo_simple_cache_key_t key; @@ -738,11 +738,11 @@ _cairo_inner_font_cache_create_entry (void *cache, if (entry == NULL) return CAIRO_STATUS_NO_MEMORY; - status = k->font_face->backend->create_font (k->font_face, - k->font_matrix, - k->ctm, - &k->options, - &entry->scaled_font); + status = k->font_face->backend->scaled_font_create (k->font_face, + k->font_matrix, + k->ctm, + &k->options, + &entry->scaled_font); if (status) { free (entry); return status; diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 5d77d20f..5520b20f 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -2035,7 +2035,7 @@ const cairo_scaled_font_backend_t cairo_ft_scaled_font_backend = { _cairo_ft_scaled_font_glyph_bbox, _cairo_ft_scaled_font_show_glyphs, _cairo_ft_scaled_font_glyph_path, - _cairo_ft_scaled_font_get_glyph_cache_key, + _cairo_ft_scaled_font_get_glyph_cache_key }; /* ft_font_face_t */ @@ -2095,11 +2095,11 @@ _cairo_ft_font_face_destroy (void *abstract_face) } static cairo_status_t -_cairo_ft_font_face_create_font (void *abstract_face, - const cairo_matrix_t *font_matrix, - const cairo_matrix_t *ctm, - const cairo_font_options_t *options, - cairo_scaled_font_t **scaled_font) +_cairo_ft_font_face_scaled_font_create (void *abstract_face, + const cairo_matrix_t *font_matrix, + const cairo_matrix_t *ctm, + const cairo_font_options_t *options, + cairo_scaled_font_t **scaled_font) { cairo_ft_font_face_t *font_face = abstract_face; int load_flags; @@ -2129,7 +2129,7 @@ _cairo_ft_font_face_create_font (void *abstract_face, static const cairo_font_face_backend_t _ft_font_face_backend = { _cairo_ft_font_face_destroy, - _cairo_ft_font_face_create_font, + _cairo_ft_font_face_scaled_font_create }; static cairo_font_face_t * diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c index f38d76ca..8820b761 100644 --- a/src/cairo-gstate.c +++ b/src/cairo-gstate.c @@ -1403,7 +1403,7 @@ _cairo_gstate_select_font_face (cairo_gstate_t *gstate, { cairo_font_face_t *font_face; - font_face = _cairo_simple_font_face_create (family, slant, weight); + font_face = _cairo_toy_font_face_create (family, slant, weight); if (font_face->status) return font_face->status; @@ -1557,9 +1557,9 @@ _cairo_gstate_ensure_font_face (cairo_gstate_t *gstate) if (!gstate->font_face) { cairo_font_face_t *font_face; - font_face = _cairo_simple_font_face_create (CAIRO_FONT_FAMILY_DEFAULT, - CAIRO_FONT_SLANT_DEFAULT, - CAIRO_FONT_WEIGHT_DEFAULT); + font_face = _cairo_toy_font_face_create (CAIRO_FONT_FAMILY_DEFAULT, + CAIRO_FONT_SLANT_DEFAULT, + CAIRO_FONT_WEIGHT_DEFAULT); if (font_face->status) return font_face->status; else diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c index b048b912..51dab1b7 100644 --- a/src/cairo-win32-font.c +++ b/src/cairo-win32-font.c @@ -1279,7 +1279,7 @@ const cairo_scaled_font_backend_t cairo_win32_scaled_font_backend = { _cairo_win32_scaled_font_glyph_bbox, _cairo_win32_scaled_font_show_glyphs, _cairo_win32_scaled_font_glyph_path, - _cairo_win32_scaled_font_get_glyph_cache_key, + _cairo_win32_scaled_font_get_glyph_cache_key }; /* cairo_win32_font_face_t */ @@ -1299,11 +1299,11 @@ _cairo_win32_font_face_destroy (void *abstract_face) } static cairo_status_t -_cairo_win32_font_face_create_font (void *abstract_face, - const cairo_matrix_t *font_matrix, - const cairo_matrix_t *ctm, - const cairo_font_options_t *options, - cairo_scaled_font_t **font) +_cairo_win32_font_face_scaled_font_create (void *abstract_face, + const cairo_matrix_t *font_matrix, + const cairo_matrix_t *ctm, + const cairo_font_options_t *options, + cairo_scaled_font_t **font) { cairo_win32_font_face_t *font_face = abstract_face; @@ -1317,7 +1317,7 @@ _cairo_win32_font_face_create_font (void *abstract_face, static const cairo_font_face_backend_t _cairo_win32_font_face_backend = { _cairo_win32_font_face_destroy, - _cairo_win32_font_face_create_font, + _cairo_win32_font_face_scaled_font_create }; /** diff --git a/src/cairoint.h b/src/cairoint.h index 31978e70..3e90865d 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -636,11 +636,11 @@ struct _cairo_font_face_backend { (*destroy) (void *font_face); cairo_status_t - (*create_font) (void *font_face, - const cairo_matrix_t *font_matrix, - const cairo_matrix_t *ctm, - const cairo_font_options_t *options, - cairo_scaled_font_t **scaled_font); + (*scaled_font_create) (void *font_face, + const cairo_matrix_t *font_matrix, + const cairo_matrix_t *ctm, + const cairo_font_options_t *options, + cairo_scaled_font_t **scaled_font); }; /* concrete font backends */ @@ -1364,16 +1364,9 @@ _cairo_font_face_init (cairo_font_face_t *font_face, const cairo_font_face_backend_t *backend); cairo_private cairo_font_face_t * -_cairo_simple_font_face_create (const char *family, - cairo_font_slant_t slant, - cairo_font_weight_t weight); - -cairo_private void -_cairo_scaled_font_init (cairo_scaled_font_t *scaled_font, - const cairo_matrix_t *font_matrix, - const cairo_matrix_t *ctm, - const cairo_font_options_t *options, - const cairo_scaled_font_backend_t *backend); +_cairo_toy_font_face_create (const char *family, + cairo_font_slant_t slant, + cairo_font_weight_t weight); cairo_private void _cairo_unscaled_font_init (cairo_unscaled_font_t *font, @@ -1385,6 +1378,13 @@ _cairo_unscaled_font_reference (cairo_unscaled_font_t *font); cairo_private void _cairo_unscaled_font_destroy (cairo_unscaled_font_t *font); +cairo_private void +_cairo_scaled_font_init (cairo_scaled_font_t *scaled_font, + const cairo_matrix_t *font_matrix, + const cairo_matrix_t *ctm, + const cairo_font_options_t *options, + const cairo_scaled_font_backend_t *backend); + cairo_private cairo_status_t _cairo_scaled_font_font_extents (cairo_scaled_font_t *scaled_font, cairo_font_extents_t *extents); |