From 8e3715f8a16b315c1c7dd4b256e7f68a36c53e7c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 23 Apr 2012 22:18:54 -0400 Subject: [PATCH] Minor --- src/hb-buffer-private.hh | 2 +- src/hb-buffer.cc | 2 +- src/hb-graphite2.cc | 5 ++--- src/hb-ot-shape-complex-arabic.cc | 4 ++-- src/hb-ot-shape-complex-misc.cc | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh index 06d4912c7..629660837 100644 --- a/src/hb-buffer-private.hh +++ b/src/hb-buffer-private.hh @@ -104,7 +104,7 @@ struct _hb_buffer_t { const uint16_t *glyph_data_be); HB_INTERNAL void replace_glyphs (unsigned int num_in, unsigned int num_out, - const uint16_t *glyph_data); + const hb_codepoint_t *glyph_data); HB_INTERNAL void replace_glyph (hb_codepoint_t glyph_index); /* Makes a copy of the glyph at idx to output and replace glyph_index */ HB_INTERNAL void output_glyph (hb_codepoint_t glyph_index); diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 4a37e669f..c566a4a29 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -271,7 +271,7 @@ hb_buffer_t::replace_glyphs_be16 (unsigned int num_in, void hb_buffer_t::replace_glyphs (unsigned int num_in, unsigned int num_out, - const uint16_t *glyph_data) + const uint32_t *glyph_data) { if (!make_room_for (num_in, num_out)) return; diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc index fa07ae9b6..eab2eae72 100644 --- a/src/hb-graphite2.cc +++ b/src/hb-graphite2.cc @@ -247,11 +247,10 @@ _hb_graphite_shape (hb_font_t *font, features++; } - unsigned short *gids = NULL; + hb_codepoint_t *gids = NULL, *pg; hb_gr_cluster_t *clusters = NULL; gr_segment *seg = NULL; uint32_t *text = NULL; - unsigned short *pg; const gr_slot *is; unsigned int ci = 0, ic = 0; float curradvx = 0., curradvy = 0.; @@ -280,7 +279,7 @@ _hb_graphite_shape (hb_font_t *font, clusters = (hb_gr_cluster_t *) calloc (charlen, sizeof (hb_gr_cluster_t)); if (!glyphlen || !clusters) goto dieout; - gids = (uint16_t *) malloc (glyphlen * sizeof (uint16_t)); + gids = (hb_codepoint_t *) malloc (glyphlen * sizeof (hb_codepoint_t)); if (!gids) goto dieout; pg = gids; diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc index a56d161a6..880a6b987 100644 --- a/src/hb-ot-shape-complex-arabic.cc +++ b/src/hb-ot-shape-complex-arabic.cc @@ -221,8 +221,8 @@ arabic_fallback_shape (hb_font_t *font, hb_buffer_t *buffer) /* Mandatory ligatures */ buffer->clear_output (); for (buffer->idx = 0; buffer->idx + 1 < count;) { - uint16_t ligature = get_ligature (buffer->info[buffer->idx].codepoint, - buffer->info[buffer->idx + 1].codepoint); + hb_codepoint_t ligature = get_ligature (buffer->info[buffer->idx].codepoint, + buffer->info[buffer->idx + 1].codepoint); if (likely (!ligature) || !(hb_font_get_glyph (font, ligature, 0, &glyph))) { buffer->next_glyph (); continue; diff --git a/src/hb-ot-shape-complex-misc.cc b/src/hb-ot-shape-complex-misc.cc index 76cb3a385..c95749ac9 100644 --- a/src/hb-ot-shape-complex-misc.cc +++ b/src/hb-ot-shape-complex-misc.cc @@ -148,8 +148,8 @@ _hb_ot_shape_complex_setup_masks_thai (hb_ot_map_t *map, hb_buffer_t *buffer, hb } /* Is SARA AM. Decompose and reorder. */ - uint16_t decomposed[2] = {uint16_t (NIKHAHIT_FROM_SARA_AM (u)), - uint16_t (SARA_AA_FROM_SARA_AM (u))}; + hb_codepoint_t decomposed[2] = {hb_codepoint_t (NIKHAHIT_FROM_SARA_AM (u)), + hb_codepoint_t (SARA_AA_FROM_SARA_AM (u))}; buffer->replace_glyphs (1, 2, decomposed); if (unlikely (buffer->in_error)) return;