提交 8e3715f8 编写于 作者: B Behdad Esfahbod

Minor

上级 d2984a24
...@@ -104,7 +104,7 @@ struct _hb_buffer_t { ...@@ -104,7 +104,7 @@ struct _hb_buffer_t {
const uint16_t *glyph_data_be); const uint16_t *glyph_data_be);
HB_INTERNAL void replace_glyphs (unsigned int num_in, HB_INTERNAL void replace_glyphs (unsigned int num_in,
unsigned int num_out, 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); HB_INTERNAL void replace_glyph (hb_codepoint_t glyph_index);
/* Makes a copy of the glyph at idx to output and replace 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); HB_INTERNAL void output_glyph (hb_codepoint_t glyph_index);
......
...@@ -271,7 +271,7 @@ hb_buffer_t::replace_glyphs_be16 (unsigned int num_in, ...@@ -271,7 +271,7 @@ hb_buffer_t::replace_glyphs_be16 (unsigned int num_in,
void void
hb_buffer_t::replace_glyphs (unsigned int num_in, hb_buffer_t::replace_glyphs (unsigned int num_in,
unsigned int num_out, unsigned int num_out,
const uint16_t *glyph_data) const uint32_t *glyph_data)
{ {
if (!make_room_for (num_in, num_out)) return; if (!make_room_for (num_in, num_out)) return;
......
...@@ -247,11 +247,10 @@ _hb_graphite_shape (hb_font_t *font, ...@@ -247,11 +247,10 @@ _hb_graphite_shape (hb_font_t *font,
features++; features++;
} }
unsigned short *gids = NULL; hb_codepoint_t *gids = NULL, *pg;
hb_gr_cluster_t *clusters = NULL; hb_gr_cluster_t *clusters = NULL;
gr_segment *seg = NULL; gr_segment *seg = NULL;
uint32_t *text = NULL; uint32_t *text = NULL;
unsigned short *pg;
const gr_slot *is; const gr_slot *is;
unsigned int ci = 0, ic = 0; unsigned int ci = 0, ic = 0;
float curradvx = 0., curradvy = 0.; float curradvx = 0., curradvy = 0.;
...@@ -280,7 +279,7 @@ _hb_graphite_shape (hb_font_t *font, ...@@ -280,7 +279,7 @@ _hb_graphite_shape (hb_font_t *font,
clusters = (hb_gr_cluster_t *) calloc (charlen, sizeof (hb_gr_cluster_t)); clusters = (hb_gr_cluster_t *) calloc (charlen, sizeof (hb_gr_cluster_t));
if (!glyphlen || !clusters) goto dieout; 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; if (!gids) goto dieout;
pg = gids; pg = gids;
......
...@@ -221,7 +221,7 @@ arabic_fallback_shape (hb_font_t *font, hb_buffer_t *buffer) ...@@ -221,7 +221,7 @@ arabic_fallback_shape (hb_font_t *font, hb_buffer_t *buffer)
/* Mandatory ligatures */ /* Mandatory ligatures */
buffer->clear_output (); buffer->clear_output ();
for (buffer->idx = 0; buffer->idx + 1 < count;) { for (buffer->idx = 0; buffer->idx + 1 < count;) {
uint16_t ligature = get_ligature (buffer->info[buffer->idx].codepoint, hb_codepoint_t ligature = get_ligature (buffer->info[buffer->idx].codepoint,
buffer->info[buffer->idx + 1].codepoint); buffer->info[buffer->idx + 1].codepoint);
if (likely (!ligature) || !(hb_font_get_glyph (font, ligature, 0, &glyph))) { if (likely (!ligature) || !(hb_font_get_glyph (font, ligature, 0, &glyph))) {
buffer->next_glyph (); buffer->next_glyph ();
......
...@@ -148,8 +148,8 @@ _hb_ot_shape_complex_setup_masks_thai (hb_ot_map_t *map, hb_buffer_t *buffer, hb ...@@ -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. */ /* Is SARA AM. Decompose and reorder. */
uint16_t decomposed[2] = {uint16_t (NIKHAHIT_FROM_SARA_AM (u)), hb_codepoint_t decomposed[2] = {hb_codepoint_t (NIKHAHIT_FROM_SARA_AM (u)),
uint16_t (SARA_AA_FROM_SARA_AM (u))}; hb_codepoint_t (SARA_AA_FROM_SARA_AM (u))};
buffer->replace_glyphs (1, 2, decomposed); buffer->replace_glyphs (1, 2, decomposed);
if (unlikely (buffer->in_error)) if (unlikely (buffer->in_error))
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册