Rename get_table to reference_table in all API
This commit is contained in:
parent
670c873499
commit
e715784be3
|
@ -88,9 +88,9 @@ struct _hb_face_t {
|
||||||
|
|
||||||
hb_bool_t immutable;
|
hb_bool_t immutable;
|
||||||
|
|
||||||
hb_get_table_func_t get_table;
|
hb_reference_table_func_t reference_table;
|
||||||
void *user_data;
|
void *user_data;
|
||||||
hb_destroy_func_t destroy;
|
hb_destroy_func_t destroy;
|
||||||
|
|
||||||
struct hb_ot_layout_t *ot_layout;
|
struct hb_ot_layout_t *ot_layout;
|
||||||
|
|
||||||
|
|
|
@ -532,7 +532,7 @@ static hb_face_t _hb_face_nil = {
|
||||||
|
|
||||||
TRUE, /* immutable */
|
TRUE, /* immutable */
|
||||||
|
|
||||||
NULL, /* get_table */
|
NULL, /* reference_table */
|
||||||
NULL, /* user_data */
|
NULL, /* user_data */
|
||||||
NULL, /* destroy */
|
NULL, /* destroy */
|
||||||
|
|
||||||
|
@ -543,19 +543,19 @@ static hb_face_t _hb_face_nil = {
|
||||||
|
|
||||||
|
|
||||||
hb_face_t *
|
hb_face_t *
|
||||||
hb_face_create_for_tables (hb_get_table_func_t get_table,
|
hb_face_create_for_tables (hb_reference_table_func_t reference_table,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
hb_destroy_func_t destroy)
|
hb_destroy_func_t destroy)
|
||||||
{
|
{
|
||||||
hb_face_t *face;
|
hb_face_t *face;
|
||||||
|
|
||||||
if (!get_table || !(face = hb_object_create<hb_face_t> ())) {
|
if (!reference_table || !(face = hb_object_create<hb_face_t> ())) {
|
||||||
if (destroy)
|
if (destroy)
|
||||||
destroy (user_data);
|
destroy (user_data);
|
||||||
return &_hb_face_nil;
|
return &_hb_face_nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
face->get_table = get_table;
|
face->reference_table = reference_table;
|
||||||
face->user_data = user_data;
|
face->user_data = user_data;
|
||||||
face->destroy = destroy;
|
face->destroy = destroy;
|
||||||
|
|
||||||
|
@ -595,7 +595,7 @@ _hb_face_for_data_closure_destroy (hb_face_for_data_closure_t *closure)
|
||||||
}
|
}
|
||||||
|
|
||||||
static hb_blob_t *
|
static hb_blob_t *
|
||||||
_hb_face_for_data_get_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
|
_hb_face_for_data_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
|
||||||
{
|
{
|
||||||
hb_face_for_data_closure_t *data = (hb_face_for_data_closure_t *) user_data;
|
hb_face_for_data_closure_t *data = (hb_face_for_data_closure_t *) user_data;
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ hb_face_create (hb_blob_t *blob,
|
||||||
if (unlikely (!closure))
|
if (unlikely (!closure))
|
||||||
return &_hb_face_nil;
|
return &_hb_face_nil;
|
||||||
|
|
||||||
return hb_face_create_for_tables (_hb_face_for_data_get_table,
|
return hb_face_create_for_tables (_hb_face_for_data_reference_table,
|
||||||
closure,
|
closure,
|
||||||
(hb_destroy_func_t) _hb_face_for_data_closure_destroy);
|
(hb_destroy_func_t) _hb_face_for_data_closure_destroy);
|
||||||
}
|
}
|
||||||
|
@ -700,10 +700,10 @@ hb_face_reference_table (hb_face_t *face,
|
||||||
{
|
{
|
||||||
hb_blob_t *blob;
|
hb_blob_t *blob;
|
||||||
|
|
||||||
if (unlikely (!face || !face->get_table))
|
if (unlikely (!face || !face->reference_table))
|
||||||
return hb_blob_get_empty ();
|
return hb_blob_get_empty ();
|
||||||
|
|
||||||
blob = face->get_table (face, tag, face->user_data);
|
blob = face->reference_table (face, tag, face->user_data);
|
||||||
if (unlikely (!blob))
|
if (unlikely (!blob))
|
||||||
return hb_blob_get_empty ();
|
return hb_blob_get_empty ();
|
||||||
|
|
||||||
|
|
|
@ -44,13 +44,13 @@ hb_face_t *
|
||||||
hb_face_create (hb_blob_t *blob,
|
hb_face_create (hb_blob_t *blob,
|
||||||
unsigned int index);
|
unsigned int index);
|
||||||
|
|
||||||
typedef hb_blob_t * (*hb_get_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data);
|
typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data);
|
||||||
|
|
||||||
/* calls destroy() when not needing user_data anymore */
|
/* calls destroy() when not needing user_data anymore */
|
||||||
hb_face_t *
|
hb_face_t *
|
||||||
hb_face_create_for_tables (hb_get_table_func_t get_table,
|
hb_face_create_for_tables (hb_reference_table_func_t reference_table,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
hb_destroy_func_t destroy);
|
hb_destroy_func_t destroy);
|
||||||
|
|
||||||
hb_face_t *
|
hb_face_t *
|
||||||
hb_face_get_empty (void);
|
hb_face_get_empty (void);
|
||||||
|
|
|
@ -243,7 +243,7 @@ hb_ft_get_font_funcs (void)
|
||||||
|
|
||||||
|
|
||||||
static hb_blob_t *
|
static hb_blob_t *
|
||||||
get_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
|
reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
|
||||||
{
|
{
|
||||||
FT_Face ft_face = (FT_Face) user_data;
|
FT_Face ft_face = (FT_Face) user_data;
|
||||||
FT_Byte *buffer;
|
FT_Byte *buffer;
|
||||||
|
@ -291,7 +291,7 @@ hb_ft_face_create (FT_Face ft_face,
|
||||||
face = hb_face_create (blob, ft_face->face_index);
|
face = hb_face_create (blob, ft_face->face_index);
|
||||||
hb_blob_destroy (blob);
|
hb_blob_destroy (blob);
|
||||||
} else {
|
} else {
|
||||||
face = hb_face_create_for_tables (get_table, ft_face, destroy);
|
face = hb_face_create_for_tables (reference_table, ft_face, destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return face;
|
return face;
|
||||||
|
|
Loading…
Reference in New Issue