Rename get_table to reference_table in all API
This commit is contained in:
parent
670c873499
commit
e715784be3
|
@ -88,7 +88,7 @@ struct _hb_face_t {
|
|||
|
||||
hb_bool_t immutable;
|
||||
|
||||
hb_get_table_func_t get_table;
|
||||
hb_reference_table_func_t reference_table;
|
||||
void *user_data;
|
||||
hb_destroy_func_t destroy;
|
||||
|
||||
|
|
|
@ -532,7 +532,7 @@ static hb_face_t _hb_face_nil = {
|
|||
|
||||
TRUE, /* immutable */
|
||||
|
||||
NULL, /* get_table */
|
||||
NULL, /* reference_table */
|
||||
NULL, /* user_data */
|
||||
NULL, /* destroy */
|
||||
|
||||
|
@ -543,19 +543,19 @@ static hb_face_t _hb_face_nil = {
|
|||
|
||||
|
||||
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,
|
||||
hb_destroy_func_t destroy)
|
||||
{
|
||||
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)
|
||||
destroy (user_data);
|
||||
return &_hb_face_nil;
|
||||
}
|
||||
|
||||
face->get_table = get_table;
|
||||
face->reference_table = reference_table;
|
||||
face->user_data = user_data;
|
||||
face->destroy = destroy;
|
||||
|
||||
|
@ -595,7 +595,7 @@ _hb_face_for_data_closure_destroy (hb_face_for_data_closure_t *closure)
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -621,7 +621,7 @@ hb_face_create (hb_blob_t *blob,
|
|||
if (unlikely (!closure))
|
||||
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,
|
||||
(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;
|
||||
|
||||
if (unlikely (!face || !face->get_table))
|
||||
if (unlikely (!face || !face->reference_table))
|
||||
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))
|
||||
return hb_blob_get_empty ();
|
||||
|
||||
|
|
|
@ -44,11 +44,11 @@ hb_face_t *
|
|||
hb_face_create (hb_blob_t *blob,
|
||||
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 */
|
||||
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,
|
||||
hb_destroy_func_t destroy);
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ hb_ft_get_font_funcs (void)
|
|||
|
||||
|
||||
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_Byte *buffer;
|
||||
|
@ -291,7 +291,7 @@ hb_ft_face_create (FT_Face ft_face,
|
|||
face = hb_face_create (blob, ft_face->face_index);
|
||||
hb_blob_destroy (blob);
|
||||
} 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;
|
||||
|
|
Loading…
Reference in New Issue