From 5fadf4c85e53a9acc9baa126b5588e4f4aeec2ed Mon Sep 17 00:00:00 2001 From: Alba Mendez Date: Wed, 1 Sep 2021 14:38:01 +0200 Subject: [PATCH] Small docs improvement Mention that the returned strings are always nul terminated for convenience. --- src/hb-ot-name.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-name.cc b/src/hb-ot-name.cc index 4588226e6..eff46ef22 100644 --- a/src/hb-ot-name.cc +++ b/src/hb-ot-name.cc @@ -156,7 +156,8 @@ hb_ot_name_get_utf (hb_face_t *face, * * Fetches a font name from the OpenType 'name' table. * If @language is #HB_LANGUAGE_INVALID, English ("en") is assumed. - * Returns string in UTF-8 encoding. + * Returns string in UTF-8 encoding. A NUL terminator is always written + * for convenience, and isn't included in the output @text_size. * * Returns: full length of the requested string, or 0 if not found. * Since: 2.1.0 @@ -183,7 +184,8 @@ hb_ot_name_get_utf8 (hb_face_t *face, * * Fetches a font name from the OpenType 'name' table. * If @language is #HB_LANGUAGE_INVALID, English ("en") is assumed. - * Returns string in UTF-16 encoding. + * Returns string in UTF-16 encoding. A NUL terminator is always written + * for convenience, and isn't included in the output @text_size. * * Returns: full length of the requested string, or 0 if not found. * Since: 2.1.0 @@ -209,7 +211,8 @@ hb_ot_name_get_utf16 (hb_face_t *face, * * Fetches a font name from the OpenType 'name' table. * If @language is #HB_LANGUAGE_INVALID, English ("en") is assumed. - * Returns string in UTF-32 encoding. + * Returns string in UTF-32 encoding. A NUL terminator is always written + * for convenience, and isn't included in the output @text_size. * * Returns: full length of the requested string, or 0 if not found. * Since: 2.1.0