Minor
diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh
index 06d4912..6296608 100644
--- a/src/hb-buffer-private.hh
+++ b/src/hb-buffer-private.hh
@@ -104,7 +104,7 @@
 					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 4a37e66..c566a4a 100644
--- a/src/hb-buffer.cc
+++ b/src/hb-buffer.cc
@@ -271,7 +271,7 @@
 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 fa07ae9..eab2eae 100644
--- a/src/hb-graphite2.cc
+++ b/src/hb-graphite2.cc
@@ -247,11 +247,10 @@
     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 @@
   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 a56d161..880a6b9 100644
--- a/src/hb-ot-shape-complex-arabic.cc
+++ b/src/hb-ot-shape-complex-arabic.cc
@@ -221,8 +221,8 @@
   /* 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 76cb3a3..c95749a 100644
--- a/src/hb-ot-shape-complex-misc.cc
+++ b/src/hb-ot-shape-complex-misc.cc
@@ -148,8 +148,8 @@
     }
 
     /* 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;