The FT_Faces on unscaled_fonts created from_face are not owned by cairo and
therefore must not be Done by cairo.
But the code in _cairo_ft_unscaled_font_lock_face
makes no distinction.
(It looks like the bug may have been introduced when the from_face unscaled_fonts were included in the ft_unscaled_font_map:
This could be fixed either by testing unscaled->from_face in
_has_unlocked_face or by initializing lock_count = 1 for unscaled_fonts
from_face and appropriately modifying the assert in
Created attachment 20773 [details] [review]
Only destroy FT_Faces created by cairo
testing from_face seems clearer than using lock_count
Pushed to master. Leaving open to pick it up for 1.8.
Author: Karl Tomlinson <email@example.com>
Date: Wed Dec 17 16:40:12 2008 -0500
[ft] Don't call FT_Done_Face() on faces we did not create
Fixed in 1.8 too.
*** Bug 44859 has been marked as a duplicate of this bug. ***
on Dec 06, 2016 at 05:44:31.
(provided by the Example extension).