In the _cairo_ft_unscaled_font_lock_face, the following assertion code is invalid: /* If this unscaled font was created from an FT_Face then we just * returned it above. */ assert (!unscaled->from_face); When _font_map_release_face_lock_held (font_map, entry) is called further below in the function, it sets unscaled->face to NULL, but unscaled->from_face remains true. So when a call to _cairo_ft_unscaled_font_lock_face is made again for the released scaled face, it leads to an assertion failure, because if (unscaled->face) return unscaled->face; does not return (unscaled->face is now NULL), while unscaled->from_face is true. This leads to an assertion failure.
I just tested the use case on the latest version of Cairo, and I see that the error does not occur. It looks like this fixed it: https://bugs.freedesktop.org/show_bug.cgi?id=18862 *** This bug has been marked as a duplicate of bug 18862 ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.