Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P2: Important
-
Resolution: Done
-
Affects Version/s: 5.4.0 Beta
-
Fix Version/s: 5.4.0
-
Component/s: GUI: Font handling, GUI: Text handling
-
Labels:None
-
Commits:0600f7d6299a21014f1b72d54fc6b23c02693204
Description
hb_face is a ref-counted object and every hb_face_reference() must be paired with hb_face_destroy() (via face_destroy_func); in contrary, HB-old's HB_Face isn't ref-counted object, so calling face_destroy_func() destroys the object.
QFontEngineFT calls harfbuzzFace() to prepare HB's face object prior to reparenting it, so we're leaking hb_face object there.
We should either not release the object returned by harfbuzzFace(), or introduce ref-counting for HB-old's HB_Face.