HarfBuzz faces reference the FreeType faces. Destroying FT faces first can cause crash in HB destruction code:
https://bugs.freedesktop.org/show_bug.cgi?id=86300
void ass_font_free(ASS_Font *font)
{
int i;
+ if (font->shaper_priv)
+ ass_shaper_font_data_free(font->shaper_priv);
for (i = 0; i < font->n_faces; ++i)
if (font->faces[i])
FT_Done_Face(font->faces[i]);
- if (font->shaper_priv)
- ass_shaper_font_data_free(font->shaper_priv);
free(font->desc.family);
free(font);
}