[wasm] Remove a few lingering hb_

This commit is contained in:
Behdad Esfahbod 2023-02-24 11:47:17 -07:00
parent d7f76f30b0
commit 7537d48f08
3 changed files with 23 additions and 23 deletions

View File

@ -57,14 +57,14 @@ font_get_scale (HB_WASM_EXEC_ENV
hb_font_get_scale (font, x_scale, y_scale); hb_font_get_scale (font, x_scale, y_scale);
} }
hb_codepoint_t codepoint_t
font_get_glyph (HB_WASM_EXEC_ENV font_get_glyph (HB_WASM_EXEC_ENV
ptr_t(font_t) fontref, ptr_t(font_t) fontref,
hb_codepoint_t unicode, codepoint_t unicode,
hb_codepoint_t variation_selector) codepoint_t variation_selector)
{ {
HB_REF2OBJ (font); HB_REF2OBJ (font);
hb_codepoint_t glyph; codepoint_t glyph;
hb_font_get_glyph (font, unicode, variation_selector, &glyph); hb_font_get_glyph (font, unicode, variation_selector, &glyph);
return glyph; return glyph;
@ -73,7 +73,7 @@ font_get_glyph (HB_WASM_EXEC_ENV
hb_position_t hb_position_t
font_get_glyph_h_advance (HB_WASM_EXEC_ENV font_get_glyph_h_advance (HB_WASM_EXEC_ENV
ptr_t(font_t) fontref, ptr_t(font_t) fontref,
hb_codepoint_t glyph) codepoint_t glyph)
{ {
HB_REF2OBJ (font); HB_REF2OBJ (font);
return hb_font_get_glyph_h_advance (font, glyph); return hb_font_get_glyph_h_advance (font, glyph);
@ -82,7 +82,7 @@ font_get_glyph_h_advance (HB_WASM_EXEC_ENV
hb_position_t hb_position_t
font_get_glyph_v_advance (HB_WASM_EXEC_ENV font_get_glyph_v_advance (HB_WASM_EXEC_ENV
ptr_t(font_t) fontref, ptr_t(font_t) fontref,
hb_codepoint_t glyph) codepoint_t glyph)
{ {
HB_REF2OBJ (font); HB_REF2OBJ (font);
return hb_font_get_glyph_v_advance (font, glyph); return hb_font_get_glyph_v_advance (font, glyph);

View File

@ -69,9 +69,9 @@ HB_WASM_BEGIN_DECLS
#define ptr_t(type_t) type_t * #define ptr_t(type_t) type_t *
#endif #endif
typedef uint32_t hb_codepoint_t; typedef uint32_t codepoint_t;
typedef int32_t hb_position_t; typedef int32_t position_t;
typedef uint32_t hb_mask_t; typedef uint32_t mask_t;
typedef uint32_t tag_t; typedef uint32_t tag_t;
#define TAG(c1,c2,c3,c4) ((tag_t)((((uint32_t)(c1)&0xFF)<<24)|(((uint32_t)(c2)&0xFF)<<16)|(((uint32_t)(c3)&0xFF)<<8)|((uint32_t)(c4)&0xFF))) #define TAG(c1,c2,c3,c4) ((tag_t)((((uint32_t)(c1)&0xFF)<<24)|(((uint32_t)(c2)&0xFF)<<16)|(((uint32_t)(c3)&0xFF)<<8)|((uint32_t)(c4)&0xFF)))
@ -115,10 +115,10 @@ typedef struct
typedef struct typedef struct
{ {
hb_position_t x_advance; position_t x_advance;
hb_position_t y_advance; position_t y_advance;
hb_position_t x_offset; position_t x_offset;
hb_position_t y_offset; position_t y_offset;
uint32_t var; uint32_t var;
} glyph_position_t; } glyph_position_t;
@ -175,18 +175,18 @@ HB_WASM_API (void, font_get_scale) (HB_WASM_EXEC_ENV
ptr_t(int32_t) x_scale, ptr_t(int32_t) x_scale,
ptr_t(int32_t) y_scale); ptr_t(int32_t) y_scale);
HB_WASM_API (hb_codepoint_t, font_get_glyph) (HB_WASM_EXEC_ENV HB_WASM_API (codepoint_t, font_get_glyph) (HB_WASM_EXEC_ENV
ptr_t(font_t), ptr_t(font_t),
hb_codepoint_t unicode, codepoint_t unicode,
hb_codepoint_t variation_selector); codepoint_t variation_selector);
HB_WASM_API (hb_position_t, font_get_glyph_h_advance) (HB_WASM_EXEC_ENV HB_WASM_API (position_t, font_get_glyph_h_advance) (HB_WASM_EXEC_ENV
ptr_t(font_t), ptr_t(font_t),
hb_codepoint_t glyph); codepoint_t glyph);
HB_WASM_API (hb_position_t, font_get_glyph_v_advance) (HB_WASM_EXEC_ENV HB_WASM_API (position_t, font_get_glyph_v_advance) (HB_WASM_EXEC_ENV
ptr_t(font_t), ptr_t(font_t),
hb_codepoint_t glyph); codepoint_t glyph);
/* shape */ /* shape */

View File

@ -87,7 +87,7 @@ shape (font_t *font, buffer_t *buffer)
uint32_t *gids = (uint32_t *) malloc (length * sizeof (uint32_t)); uint32_t *gids = (uint32_t *) malloc (length * sizeof (uint32_t));
memset (clusters, 0, sizeof (clusters[0]) * length); memset (clusters, 0, sizeof (clusters[0]) * length);
hb_codepoint_t *pg = gids; codepoint_t *pg = gids;
clusters[0].cluster = contents.info[0].cluster; clusters[0].cluster = contents.info[0].cluster;
unsigned int upem = face_get_upem (face); unsigned int upem = face_get_upem (face);
int32_t font_x_scale, font_y_scale; int32_t font_x_scale, font_y_scale;