mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-22 12:20:26 +01:00
Always save the origin face index
Save the original face_index also for the from_face case, so we can always rely on it when applying font variations. This prevents us from running into the same trap we've seen before where ft_face->face_index changes underneath us as font variations are applied.
This commit is contained in:
parent
1735fc41d3
commit
42f07ef903
1 changed files with 3 additions and 2 deletions
|
|
@ -428,7 +428,7 @@ _cairo_ft_unscaled_font_init (cairo_ft_unscaled_font_t *unscaled,
|
|||
|
||||
if (from_face) {
|
||||
unscaled->from_face = TRUE;
|
||||
_cairo_ft_unscaled_font_init_key (unscaled, TRUE, NULL, 0, face);
|
||||
_cairo_ft_unscaled_font_init_key (unscaled, TRUE, NULL, face->face_index, face);
|
||||
|
||||
unscaled->have_color = FT_HAS_COLOR (face) != 0;
|
||||
unscaled->have_color_set = TRUE;
|
||||
|
|
@ -487,7 +487,7 @@ _cairo_ft_unscaled_font_keys_equal (const void *key_a,
|
|||
|
||||
if (unscaled_a->id == unscaled_b->id &&
|
||||
unscaled_a->from_face == unscaled_b->from_face)
|
||||
{
|
||||
{
|
||||
if (unscaled_a->from_face)
|
||||
return unscaled_a->face == unscaled_b->face;
|
||||
|
||||
|
|
@ -3758,6 +3758,7 @@ cairo_ft_scaled_font_lock_face (cairo_scaled_font_t *abstract_font)
|
|||
{
|
||||
cairo_ft_scaled_font_t *scaled_font = (cairo_ft_scaled_font_t *) abstract_font;
|
||||
FT_Face face;
|
||||
int instance_id;
|
||||
cairo_status_t status;
|
||||
|
||||
if (! _cairo_scaled_font_is_ft (abstract_font)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue