Blame SOURCES/0001-Fix-assertion-failure-in-the-freetype-backend.patch

0a15aa
From 7554822dd0b52d33ec7898e81b59e97164b00142 Mon Sep 17 00:00:00 2001
0a15aa
From: Uli Schlachter <psychon@znc.in>
0a15aa
Date: Sat, 21 Apr 2018 09:37:06 +0200
0a15aa
Subject: [PATCH] Fix assertion failure in the freetype backend
0a15aa
0a15aa
Fonts are kept in a hash table, so when creating a new font, the code
0a15aa
first checks the hash table for an already-existing entry and only then
0a15aa
is a new instance really created. There is an assert that checks that
0a15aa
the key used for the hash table lookup is the same as the instance that
0a15aa
is created later has, because otherwise the hash table was checked
0a15aa
incorrectly.
0a15aa
0a15aa
This assert failed in some conditions.
0a15aa
0a15aa
Fix this by fixing some places that initialised ft hash keys in a wrong
0a15aa
way.
0a15aa
0a15aa
Patch by Behdad Esfahbod and submitted via bugzilla.
0a15aa
0a15aa
Source: https://bugs.freedesktop.org/show_bug.cgi?id=105746#c4
0a15aa
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105746
0a15aa
Signed-off-by: Uli Schlachter <psychon@znc.in>
0a15aa
---
0a15aa
 src/cairo-ft-font.c | 4 ++--
0a15aa
 1 file changed, 2 insertions(+), 2 deletions(-)
0a15aa
0a15aa
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
0a15aa
index 79aef78f5b0d..9b10708988d7 100644
0a15aa
--- a/src/cairo-ft-font.c
0a15aa
+++ b/src/cairo-ft-font.c
0a15aa
@@ -445,7 +445,7 @@ _cairo_ft_unscaled_font_init (cairo_ft_unscaled_font_t *unscaled,
0a15aa
 
0a15aa
     if (from_face) {
0a15aa
 	unscaled->from_face = TRUE;
0a15aa
-	_cairo_ft_unscaled_font_init_key (unscaled, TRUE, NULL, face->face_index, face);
0a15aa
+	_cairo_ft_unscaled_font_init_key (unscaled, TRUE, NULL, id, face);
0a15aa
 
0a15aa
 
0a15aa
         unscaled->have_color = FT_HAS_COLOR (face) != 0;
0a15aa
@@ -640,7 +640,7 @@ static cairo_status_t
0a15aa
 _cairo_ft_unscaled_font_create_from_face (FT_Face face,
0a15aa
 					  cairo_ft_unscaled_font_t **out)
0a15aa
 {
0a15aa
-    return _cairo_ft_unscaled_font_create_internal (TRUE, NULL, 0, face, out);
0a15aa
+    return _cairo_ft_unscaled_font_create_internal (TRUE, NULL, face->face_index, face, out);
0a15aa
 }
0a15aa
 
0a15aa
 static cairo_bool_t
0a15aa
-- 
0a15aa
2.17.0
0a15aa