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.
This commit is contained in:
n8willis 2020-04-15 18:46:31 +01:00 committed by GitHub
parent 1bca2be256
commit b57b904242
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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