From 3883a371f2ba78b17a1302ba8c5df1a79f3e4075 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 26 Sep 2008 00:20:21 -0400 Subject: [PATCH] [scaled-font] Use full ctm matrix when comparing scaled-font keys We use the full matrix in hash computation, but only compare the non-translation items in equality check. This is no bug though, as we set the ctm translation components of a scaled font to zero explicitly. But the change makes the hash and equal functions consistent, which is good. --- src/cairo-scaled-font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c index a8185afca..d8d78f4d0 100644 --- a/src/cairo-scaled-font.c +++ b/src/cairo-scaled-font.c @@ -569,7 +569,7 @@ _cairo_scaled_font_keys_equal (const void *abstract_key_a, const void *abstract_ sizeof(cairo_matrix_t)) == 0 && memcmp ((unsigned char *)(&key_a->ctm.xx), (unsigned char *)(&key_b->ctm.xx), - sizeof(double) * 4) == 0 && + sizeof(cairo_matrix_t)) == 0 && cairo_font_options_equal (&key_a->options, &key_b->options)); }