From 7537d48f081f25e3bd78dcacf9218535a1e40c2f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 24 Feb 2023 11:47:17 -0700 Subject: [PATCH] [wasm] Remove a few lingering hb_ --- src/hb-wasm-api-font.hh | 12 ++++++------ src/hb-wasm-api.h | 32 ++++++++++++++++---------------- src/wasm-graphite/shape.cc | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/hb-wasm-api-font.hh b/src/hb-wasm-api-font.hh index b1bc1fbd9..2956109c9 100644 --- a/src/hb-wasm-api-font.hh +++ b/src/hb-wasm-api-font.hh @@ -57,14 +57,14 @@ font_get_scale (HB_WASM_EXEC_ENV hb_font_get_scale (font, x_scale, y_scale); } -hb_codepoint_t +codepoint_t font_get_glyph (HB_WASM_EXEC_ENV ptr_t(font_t) fontref, - hb_codepoint_t unicode, - hb_codepoint_t variation_selector) + codepoint_t unicode, + codepoint_t variation_selector) { HB_REF2OBJ (font); - hb_codepoint_t glyph; + codepoint_t glyph; hb_font_get_glyph (font, unicode, variation_selector, &glyph); return glyph; @@ -73,7 +73,7 @@ font_get_glyph (HB_WASM_EXEC_ENV hb_position_t font_get_glyph_h_advance (HB_WASM_EXEC_ENV ptr_t(font_t) fontref, - hb_codepoint_t glyph) + codepoint_t glyph) { HB_REF2OBJ (font); 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 font_get_glyph_v_advance (HB_WASM_EXEC_ENV ptr_t(font_t) fontref, - hb_codepoint_t glyph) + codepoint_t glyph) { HB_REF2OBJ (font); return hb_font_get_glyph_v_advance (font, glyph); diff --git a/src/hb-wasm-api.h b/src/hb-wasm-api.h index 946e1aa92..45d881cd0 100644 --- a/src/hb-wasm-api.h +++ b/src/hb-wasm-api.h @@ -69,9 +69,9 @@ HB_WASM_BEGIN_DECLS #define ptr_t(type_t) type_t * #endif -typedef uint32_t hb_codepoint_t; -typedef int32_t hb_position_t; -typedef uint32_t hb_mask_t; +typedef uint32_t codepoint_t; +typedef int32_t position_t; +typedef uint32_t mask_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))) @@ -115,10 +115,10 @@ typedef struct typedef struct { - hb_position_t x_advance; - hb_position_t y_advance; - hb_position_t x_offset; - hb_position_t y_offset; + position_t x_advance; + position_t y_advance; + position_t x_offset; + position_t y_offset; uint32_t var; } 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) 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), - hb_codepoint_t unicode, - hb_codepoint_t variation_selector); + codepoint_t unicode, + codepoint_t variation_selector); -HB_WASM_API (hb_position_t, font_get_glyph_h_advance) (HB_WASM_EXEC_ENV - ptr_t(font_t), - hb_codepoint_t glyph); +HB_WASM_API (position_t, font_get_glyph_h_advance) (HB_WASM_EXEC_ENV + ptr_t(font_t), + codepoint_t glyph); -HB_WASM_API (hb_position_t, font_get_glyph_v_advance) (HB_WASM_EXEC_ENV - ptr_t(font_t), - hb_codepoint_t glyph); +HB_WASM_API (position_t, font_get_glyph_v_advance) (HB_WASM_EXEC_ENV + ptr_t(font_t), + codepoint_t glyph); /* shape */ diff --git a/src/wasm-graphite/shape.cc b/src/wasm-graphite/shape.cc index 9f171d6c2..b4da4c463 100644 --- a/src/wasm-graphite/shape.cc +++ b/src/wasm-graphite/shape.cc @@ -87,7 +87,7 @@ shape (font_t *font, buffer_t *buffer) uint32_t *gids = (uint32_t *) malloc (length * sizeof (uint32_t)); memset (clusters, 0, sizeof (clusters[0]) * length); - hb_codepoint_t *pg = gids; + codepoint_t *pg = gids; clusters[0].cluster = contents.info[0].cluster; unsigned int upem = face_get_upem (face); int32_t font_x_scale, font_y_scale;