From b57b9042420538f998cc0941407be8059b6e7562 Mon Sep 17 00:00:00 2001 From: n8willis Date: Wed, 15 Apr 2020 18:46:31 +0100 Subject: [PATCH] Add detail to hb_ft_font_create inline comments Providing lengthier explanation for how the destroy function works on the hb_font_t but that destroying the FT_Face (and not destroying it too early) remains the client's responsibility. --- src/hb-ft.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hb-ft.cc b/src/hb-ft.cc index 804897ce4..d62198342 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -721,6 +721,12 @@ hb_ft_face_create_cached (FT_Face ft_face) * then it is the client program's responsibility to destroy @ft_face * after the #hb_font_t font object has been destroyed. * + * HarfBuzz will use the @destroy callback on the #hb_font_t font object + * if it is supplied when you use this function. However, even if @destroy + * is provided, it is the client program's responsibility to destroy @ft_face, + * and it is the client program's responsibility to ensure that @ft_face is + * destroyed only after the #hb_font_t font object has been destroyed. + * * Return value: (transfer full): the new #hb_font_t font object * * Since: 0.9.2