| Index: third_party/harfbuzz-ng/src/hb-ft.h
|
| diff --git a/third_party/harfbuzz-ng/src/hb-ft.h b/third_party/harfbuzz-ng/src/hb-ft.h
|
| index 696251e143f31987eb599f8cb16db4f12ff8d901..92f4b3614415503a939da9409b3794d85e7d7b7b 100644
|
| --- a/third_party/harfbuzz-ng/src/hb-ft.h
|
| +++ b/third_party/harfbuzz-ng/src/hb-ft.h
|
| @@ -34,19 +34,76 @@
|
|
|
| HB_BEGIN_DECLS
|
|
|
| -/* Note: FreeType is not thread-safe. Hence, these functions are not either. */
|
| +/*
|
| + * Note: FreeType is not thread-safe.
|
| + * Hence, these functions are not either.
|
| + */
|
| +
|
| +/*
|
| + * hb-face from ft-face.
|
| + */
|
|
|
| +/* This one creates a new hb-face for given ft-face.
|
| + * When the returned hb-face is destroyed, the destroy
|
| + * callback is called (if not NULL), with the ft-face passed
|
| + * to it.
|
| + *
|
| + * The client is responsible to make sure that ft-face is
|
| + * destroyed after hb-face is destroyed.
|
| + *
|
| + * Most often you don't want this function. You should use either
|
| + * hb_ft_face_create_cached(), or hb_ft_face_create_referenced().
|
| + * In particular, if you are going to pass NULL as destroy, you
|
| + * probably should use (the more recent) hb_ft_face_create_referenced()
|
| + * instead.
|
| + */
|
| hb_face_t *
|
| hb_ft_face_create (FT_Face ft_face,
|
| hb_destroy_func_t destroy);
|
|
|
| +/* This version is like hb_ft_face_create(), except that it caches
|
| + * the hb-face using the generic pointer of the ft-face. This means
|
| + * that subsequent calls to this function with the same ft-face will
|
| + * return the same hb-face (correctly referenced).
|
| + *
|
| + * Client is still responsible for making sure that ft-face is destroyed
|
| + * after hb-face is.
|
| + */
|
| hb_face_t *
|
| hb_ft_face_create_cached (FT_Face ft_face);
|
|
|
| +/* This version is like hb_ft_face_create(), except that it calls
|
| + * FT_Reference_Face() on ft-face, as such keeping ft-face alive
|
| + * as long as the hb-face is.
|
| + *
|
| + * This is the most convenient version to use. Use it unless you have
|
| + * very good reasons not to.
|
| + */
|
| +hb_face_t *
|
| +hb_ft_face_create_referenced (FT_Face ft_face);
|
| +
|
| +
|
| +/*
|
| + * hb-font from ft-face.
|
| + */
|
| +
|
| +/*
|
| + * Note:
|
| + *
|
| + * Set face size on ft-face before creating hb-font from it.
|
| + * Otherwise hb-ft would NOT pick up the font size correctly.
|
| + */
|
| +
|
| +/* See notes on hb_ft_face_create(). Same issues re lifecycle-management
|
| + * apply here. Use hb_ft_font_create_referenced() if you can. */
|
| hb_font_t *
|
| hb_ft_font_create (FT_Face ft_face,
|
| hb_destroy_func_t destroy);
|
|
|
| +/* See notes on hb_ft_face_create_referenced() re lifecycle-management
|
| + * issues. */
|
| +hb_font_t *
|
| +hb_ft_font_create_referenced (FT_Face ft_face);
|
|
|
|
|
| /* Makes an hb_font_t use FreeType internally to implement font functions. */
|
|
|