diff options
author | Carl Worth <cworth@cworth.org> | 2005-08-11 06:35:20 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2005-08-11 06:35:20 +0000 |
commit | 34c9e242c85cfe5cb2b53182bea07513f38c9c78 (patch) | |
tree | 21ed4e1b333c681186aebcf81dc47acd032b8e62 /src/cairo-font.c | |
parent | b25c1203d8d313d9b44f29e4b0d1329dddd42dbe (diff) |
Re-order cairo_scaled_font->font_face parameter to maintain the font_face,font_matrix,ctm,options order that prevails throughout the implementation. Add font_face parameter to _cairo_scaled_font_init.
Remove const qualifier from toy_face parameter to creat_toy, as these functions may reference the font face. Track addition of font_face parameter to _cairo_scaled_font_init.
Implement font_face parameter to _cairo_scaled_font_init, moving the reference of the font_face from _cairo_inner_font_cache_create_entry.
Add a font_face parameter in addition to the unscaled_font parameter.
Track new font_face parameter to _cairo_ft_scaled_font_create.
Whitespace touchup.
Reviewed by: otaylor
Diffstat (limited to 'src/cairo-font.c')
-rw-r--r-- | src/cairo-font.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cairo-font.c b/src/cairo-font.c index 10fcb5f5..d2ec54d6 100644 --- a/src/cairo-font.c +++ b/src/cairo-font.c @@ -454,6 +454,7 @@ _cairo_toy_font_face_create (const char *family, static const cairo_scaled_font_t _cairo_scaled_font_nil = { CAIRO_STATUS_NO_MEMORY, /* status */ -1, /* ref_count */ + NULL, /* font_face */ { 1., 0., 0., 1., 0, 0}, /* font_matrix */ { 1., 0., 0., 1., 0, 0}, /* ctm */ { 1., 0., 0., 1., 0, 0}, /* scale */ @@ -461,7 +462,6 @@ static const cairo_scaled_font_t _cairo_scaled_font_nil = { CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT} , - NULL, /* font_face */ CAIRO_SCALED_FONT_BACKEND_DEFAULT, }; @@ -748,9 +748,6 @@ _cairo_inner_font_cache_create_entry (void *cache, return status; } - entry->scaled_font->font_face = k->font_face; - cairo_font_face_reference (k->font_face); - entry->key.base.memory = 0; entry->key.font_face = k->font_face; entry->key.font_matrix = &entry->scaled_font->font_matrix; @@ -857,6 +854,7 @@ cairo_scaled_font_create (cairo_font_face_t *font_face, void _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, @@ -864,6 +862,7 @@ _cairo_scaled_font_init (cairo_scaled_font_t *scaled_font, { scaled_font->status = CAIRO_STATUS_SUCCESS; + scaled_font->font_face = cairo_font_face_reference (font_face); scaled_font->font_matrix = *font_matrix; scaled_font->ctm = *ctm; cairo_matrix_multiply (&scaled_font->scale, &scaled_font->font_matrix, &scaled_font->ctm); |