Top |
hb_face_t * | hb_ft_face_create () |
hb_face_t * | hb_ft_face_create_cached () |
hb_face_t * | hb_ft_face_create_referenced () |
hb_font_t * | hb_ft_font_create () |
hb_font_t * | hb_ft_font_create_referenced () |
void | hb_ft_font_changed () |
FT_Face | hb_ft_font_get_face () |
FT_Face | hb_ft_font_lock_face () |
void | hb_ft_font_unlock_face () |
void | hb_ft_font_set_load_flags () |
int | hb_ft_font_get_load_flags () |
void | hb_ft_font_set_funcs () |
Functions for using HarfBuzz with the FreeType library.
HarfBuzz supports using FreeType to provide face and font data.
hb_face_t * hb_ft_face_create (FT_Face ft_face
,hb_destroy_func_t destroy
);
Creates an hb_face_t face object from the specified FT_Face.
This variant of the function does not provide any life-cycle management.
Most client programs should use hb_ft_face_create_referenced()
(or, perhaps, hb_ft_face_create_cached()
) instead.
If you know you have valid reasons not to use hb_ft_face_create_referenced()
,
then it is the client program's responsibility to destroy ft_face
after the hb_face_t face object has been destroyed.
ft_face |
FT_Face to work upon. |
[destroy destroy][scope notified] |
destroy |
A callback to call when the face object is not needed anymore. |
[optional] |
Since: 0.9.2
hb_face_t *
hb_ft_face_create_cached (FT_Face ft_face
);
Creates an hb_face_t face object from the specified FT_Face.
This variant of the function caches the newly created hb_face_t
face object, using the generic
pointer of ft_face
. Subsequent function
calls that are passed the same ft_face
parameter will have the same
hb_face_t returned to them, and that hb_face_t will be correctly
reference counted.
However, client programs are still responsible for destroying
ft_face
after the last hb_face_t face object has been destroyed.
Since: 0.9.2
hb_face_t *
hb_ft_face_create_referenced (FT_Face ft_face
);
Creates an hb_face_t face object from the specified FT_Face.
This is the preferred variant of the hb_ft_face_create*
function family, because it calls FT_Reference_Face()
on ft_face
,
ensuring that ft_face
remains alive as long as the resulting
hb_face_t face object remains alive. Also calls FT_Done_Face()
when the hb_face_t face object is destroyed.
Use this version unless you know you have good reasons not to.
Since: 0.9.38
hb_font_t * hb_ft_font_create (FT_Face ft_face
,hb_destroy_func_t destroy
);
Creates an hb_font_t font object from the specified FT_Face.
ft_face
before calling
hb_ft_font_create()
on it. Otherwise, HarfBuzz will not pick up
the face size.This variant of the function does not provide any life-cycle management.
Most client programs should use hb_ft_font_create_referenced()
instead.
If you know you have valid reasons not to use hb_ft_font_create_referenced()
,
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.
ft_face |
FT_Face to work upon. |
[destroy destroy][scope notified] |
destroy |
A callback to call when the font object is not needed anymore. |
[optional] |
Since: 0.9.2
hb_font_t *
hb_ft_font_create_referenced (FT_Face ft_face
);
Creates an hb_font_t font object from the specified FT_Face.
ft_face
before calling
hb_ft_font_create_references()
on it. Otherwise, HarfBuzz will not pick up
the face size.This is the preferred variant of the hb_ft_font_create*
function family, because it calls FT_Reference_Face()
on ft_face
,
ensuring that ft_face
remains alive as long as the resulting
hb_font_t font object remains alive.
Use this version unless you know you have good reasons not to.
Since: 0.9.38
void hb_ft_font_set_load_flags (hb_font_t *font
,int load_flags
);
Sets the FT_Load_Glyph load flags for the specified hb_font_t.
For more information, see https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.htmlft_load_xxx
Since: 1.0.5
int
hb_ft_font_get_load_flags (hb_font_t *font
);
Fetches the FT_Load_Glyph load flags of the specified hb_font_t.
For more information, see https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.htmlft_load_xxx
Since: 1.0.5
void
hb_ft_font_set_funcs (hb_font_t *font
);
Configures the font-functions structure of the specified hb_font_t font object to use FreeType font functions.
In particular, you can use this function to configure an
existing hb_face_t face object for use with FreeType font
functions even if that hb_face_t face object was initially
created with hb_face_create()
, and therefore was not
initially configured to use FreeType font functions.
An hb_face_t face object created with hb_ft_face_create()
is preconfigured for FreeType font functions and does not
require this function to be used.
Since: 1.0.5