mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-06 03:28:09 +02:00
[scaled-font-subset] Check for matching font-face implementors
Catch toy and user fonts which may have different font-faces for their implementation than the original ones they were created with.
This commit is contained in:
parent
6e78c94615
commit
3063f0f44c
1 changed files with 4 additions and 2 deletions
|
|
@ -230,11 +230,13 @@ _cairo_sub_fonts_equal (const void *key_a, const void *key_b)
|
|||
{
|
||||
const cairo_sub_font_t *sub_font_a = key_a;
|
||||
const cairo_sub_font_t *sub_font_b = key_b;
|
||||
cairo_scaled_font_t *a = sub_font_a->scaled_font;
|
||||
cairo_scaled_font_t *b = sub_font_b->scaled_font;
|
||||
|
||||
if (sub_font_a->is_scaled)
|
||||
return sub_font_a->scaled_font == sub_font_b->scaled_font;
|
||||
return a == b;
|
||||
else
|
||||
return sub_font_a->scaled_font->font_face == sub_font_b->scaled_font->font_face;
|
||||
return a->font_face == b->font_face || a->original_font_face == b->original_font_face;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue