|
|
@ -95,14 +95,16 @@ _hb_ft_font_create (FT_Face ft_face, bool symbol, bool unref) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
_hb_ft_face_destroy (FT_Face ft_face) |
|
|
|
_hb_ft_face_destroy (void *data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
FT_Done_Face (ft_face); |
|
|
|
FT_Done_Face ((FT_Face) data); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
_hb_ft_font_destroy (hb_ft_font_t *ft_font) |
|
|
|
_hb_ft_font_destroy (void *data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
hb_ft_font_t *ft_font = (hb_ft_font_t *) data; |
|
|
|
|
|
|
|
|
|
|
|
if (ft_font->unref) |
|
|
|
if (ft_font->unref) |
|
|
|
_hb_ft_face_destroy (ft_font->ft_face); |
|
|
|
_hb_ft_face_destroy (ft_font->ft_face); |
|
|
|
|
|
|
|
|
|
|
@ -124,7 +126,7 @@ hb_ft_font_set_load_flags (hb_font_t *font, int load_flags) |
|
|
|
if (font->immutable) |
|
|
|
if (font->immutable) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy) |
|
|
|
if (font->destroy != _hb_ft_font_destroy) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
hb_ft_font_t *ft_font = (hb_ft_font_t *) font->user_data; |
|
|
|
hb_ft_font_t *ft_font = (hb_ft_font_t *) font->user_data; |
|
|
@ -144,7 +146,7 @@ hb_ft_font_set_load_flags (hb_font_t *font, int load_flags) |
|
|
|
int |
|
|
|
int |
|
|
|
hb_ft_font_get_load_flags (hb_font_t *font) |
|
|
|
hb_ft_font_get_load_flags (hb_font_t *font) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy) |
|
|
|
if (font->destroy != _hb_ft_font_destroy) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
|
|
const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font->user_data; |
|
|
|
const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font->user_data; |
|
|
@ -155,7 +157,7 @@ hb_ft_font_get_load_flags (hb_font_t *font) |
|
|
|
FT_Face |
|
|
|
FT_Face |
|
|
|
hb_ft_font_get_face (hb_font_t *font) |
|
|
|
hb_ft_font_get_face (hb_font_t *font) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy) |
|
|
|
if (font->destroy != _hb_ft_font_destroy) |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|
|
|
|
|
|
|
|
|
const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font->user_data; |
|
|
|
const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font->user_data; |
|
|
@ -474,7 +476,7 @@ retry: |
|
|
|
hb_font_set_funcs (font, |
|
|
|
hb_font_set_funcs (font, |
|
|
|
funcs, |
|
|
|
funcs, |
|
|
|
_hb_ft_font_create (ft_face, symbol, unref), |
|
|
|
_hb_ft_font_create (ft_face, symbol, unref), |
|
|
|
(hb_destroy_func_t) _hb_ft_font_destroy); |
|
|
|
_hb_ft_font_destroy); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -553,7 +555,7 @@ hb_face_t * |
|
|
|
hb_ft_face_create_referenced (FT_Face ft_face) |
|
|
|
hb_ft_face_create_referenced (FT_Face ft_face) |
|
|
|
{ |
|
|
|
{ |
|
|
|
FT_Reference_Face (ft_face); |
|
|
|
FT_Reference_Face (ft_face); |
|
|
|
return hb_ft_face_create (ft_face, (hb_destroy_func_t) _hb_ft_face_destroy); |
|
|
|
return hb_ft_face_create (ft_face, _hb_ft_face_destroy); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
@ -655,7 +657,7 @@ hb_font_t * |
|
|
|
hb_ft_font_create_referenced (FT_Face ft_face) |
|
|
|
hb_ft_font_create_referenced (FT_Face ft_face) |
|
|
|
{ |
|
|
|
{ |
|
|
|
FT_Reference_Face (ft_face); |
|
|
|
FT_Reference_Face (ft_face); |
|
|
|
return hb_ft_font_create (ft_face, (hb_destroy_func_t) _hb_ft_face_destroy); |
|
|
|
return hb_ft_font_create (ft_face, _hb_ft_face_destroy); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|