[HarfBuzz] How to make sure an hb_font_t object is valid?

Eli Zaretskii eliz at gnu.org
Thu May 30 13:32:20 UTC 2019

> From: Ebrahim Byagowi <ebraminio at gmail.com>
> Date: Thu, 30 May 2019 11:14:13 +0430
> Cc: "harfbuzz at lists.freedesktop.org" <harfbuzz at lists.freedesktop.org>
> Oh hb_font_t, I am sorry, as far as I know they are always valid, I don't know of a case that it can be invalid
> other than having an invalid hb_face_t. Maybe others can help better on this. Relying on hb_shape_full result is
> not that common practice as most of clients don't use it and they use hb_shape which returns void, I suggest
> you to stick to that also.

As far as I remember, it was Khaled who wrote the shaper, and his
original code used hb_shape_full.  We just didn't dare to change that,
although I can see that the arguments we actually pass to the shaper
don't really justify calling hb_shape_full, it only provides the
return value, unlike hb_shape, so maybe Khaled wanted that value for
more solid code?

More information about the HarfBuzz mailing list