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

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