diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-02-15 21:27:29 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-02-24 20:00:17 +0000 |
commit | 6eb0a9d97ff7eaaee69ca10e4081cb950a543ce3 (patch) | |
tree | 0771f69998a71f5cfd866a252a1d8373d5d3f3a7 /src/cairo-toy-font-face.c | |
parent | fe7d5323f5bc734e76179b74d68fcba9b924ba94 (diff) | |
download | cairo-6eb0a9d97ff7eaaee69ca10e4081cb950a543ce3.tar.gz |
[scaled-font] Hold reference to original font face
As noted by Carl during his LCA talk, caching of toy fonts was broken
because we create the scaled font using the implementation font face and
lose the reference to the containing font face that is cached by the toy
font face create routines. So the toy fonts were not being preserved for
the duration of the holdover scaled fonts and we recreated a new font
face, new scaled font and new glyph caches every time we needed a font.
Diffstat (limited to 'src/cairo-toy-font-face.c')
-rw-r--r-- | src/cairo-toy-font-face.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cairo-toy-font-face.c b/src/cairo-toy-font-face.c index 05ad495db..b2d41af30 100644 --- a/src/cairo-toy-font-face.c +++ b/src/cairo-toy-font-face.c @@ -325,6 +325,7 @@ cairo_toy_font_face_create (const char *family, if (unlikely (status)) goto UNWIND_FONT_FACE_MALLOC; + assert (font_face->base.hash_entry.hash == key.base.hash_entry.hash); status = _cairo_hash_table_insert (hash_table, &font_face->base.hash_entry); if (unlikely (status)) goto UNWIND_FONT_FACE_INIT; |