src/hb-buffer-private.hh | 2 +- src/hb-buffer.cc | 5 +++-- src/hb-open-type-private.hh | 1 + src/hb-ot-layout-gsub-table.hh | 4 ++-- src/hb-ot-layout-gsubgpos-private.hh | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-)
New commits: commit 0bb0f5d41976ae27c5c7a51cbb82144b48315a4b Author: Behdad Esfahbod <beh...@behdad.org> Date: Thu Jun 7 17:42:48 2012 -0400 Add note re _NullPool diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 5d90e5b..5f097f0 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -130,6 +130,7 @@ inline Type& StructAfter(TObject &X) */ /* Global nul-content Null pool. Enlarge as necessary. */ +/* TODO This really should be a extern HB_INTERNAL and defined somewhere... */ static const void *_NullPool[64 / sizeof (void *)]; /* Generic nul-content Null objects. */ commit 2a3d911fe0ff5d6442659d3381d5b08c30ee2896 Author: Behdad Esfahbod <beh...@behdad.org> Date: Thu Jun 7 17:31:46 2012 -0400 Fix alignment-requirement missmatch Detected by clang and lots of cmdline options. diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh index b539f26..4077bb3 100644 --- a/src/hb-buffer-private.hh +++ b/src/hb-buffer-private.hh @@ -112,7 +112,7 @@ struct _hb_buffer_t { HB_INTERNAL void clear_positions (void); HB_INTERNAL void replace_glyphs_be16 (unsigned int num_in, unsigned int num_out, - const uint16_t *glyph_data_be); + const char *glyph_data_be); HB_INTERNAL void replace_glyphs (unsigned int num_in, unsigned int num_out, const hb_codepoint_t *glyph_data); diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index e2c34f1..9c9b32e 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -233,7 +233,7 @@ hb_buffer_t::swap_buffers (void) void hb_buffer_t::replace_glyphs_be16 (unsigned int num_in, unsigned int num_out, - const uint16_t *glyph_data_be) + const char *glyph_data_be) { if (!make_room_for (num_in, num_out)) return; @@ -245,10 +245,11 @@ hb_buffer_t::replace_glyphs_be16 (unsigned int num_in, } hb_glyph_info_t *pinfo = &out_info[out_len]; + const unsigned char *data = (const unsigned char *) glyph_data_be; for (unsigned int i = 0; i < num_out; i++) { *pinfo = orig_info; - pinfo->codepoint = hb_be_uint16 (glyph_data_be[i]); + pinfo->codepoint = (data[2*i] << 8) | data[2*i+1]; pinfo++; } diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index f6a7575..4229f32 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -213,7 +213,7 @@ struct Sequence if (unlikely (!substitute.len)) return TRACE_RETURN (false); unsigned int klass = c->property & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE ? HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH : 0; - c->replace_glyphs_be16 (1, substitute.len, (const uint16_t *) substitute.array, klass); + c->replace_glyphs_be16 (1, substitute.len, (const char *) substitute.array, klass); return TRACE_RETURN (true); } @@ -502,7 +502,7 @@ struct Ligature if (skippy_iter.idx < c->buffer->idx + count) /* No input glyphs skipped */ { - c->replace_glyphs_be16 (count, 1, (const uint16_t *) &ligGlyph, klass); + c->replace_glyphs_be16 (count, 1, (const char *) &ligGlyph, klass); } else { diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index a2e4b2f..e590e39 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -230,7 +230,7 @@ struct hb_apply_context_t } inline void replace_glyphs_be16 (unsigned int num_in, unsigned int num_out, - const uint16_t *glyph_data_be, + const char *glyph_data_be, unsigned int klass = 0) const { buffer->cur().props_cache() = klass; /* XXX if has gdef? */ _______________________________________________ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz