Skip to content

Commit

Permalink
[scaled-font] Use full ctm matrix when comparing scaled-font keys
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Behdad Esfahbod committed Sep 26, 2008
1 parent 48099af commit 3883a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cairo-scaled-font.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 3883a37

Please sign in to comment.