src/hb-aat-layout-morx-table.hh | 11 +++++++++-- src/hb-buffer-serialize.cc | 4 ++-- test/shaping/data/text-rendering-tests/DISABLED | 20 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-)
New commits: commit 94644d7ea4cf217e4d6c6ff57d65e1e20866ea6d Author: Behdad Esfahbod <beh...@behdad.org> Date: Thu Jan 11 11:49:07 2018 +0100 [aat] Generate finegrained unsafe-to-break in state-machine! Neato. diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index cbc69d26..8c62b174 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -57,16 +57,19 @@ struct RearrangementSubtable unsigned int num_glyphs = c->face->get_num_glyphs (); unsigned int state = 0; + unsigned int last_zero = 0; + unsigned int last_zero_before_start = 0; unsigned int start = 0; unsigned int end = 0; hb_glyph_info_t *info = c->buffer->info; unsigned int count = c->buffer->len; - c->buffer->unsafe_to_break (0, count); /* TODO Improve. */ - for (unsigned int i = 0; i < count; i++) { + if (!state) + last_zero = i; + unsigned int klass = machine.get_class (info[i].codepoint, num_glyphs); const Entry<void> *entry = machine.get_entry (state, klass); if (unlikely (!entry)) @@ -75,7 +78,10 @@ struct RearrangementSubtable unsigned int flags = entry->flags; if (flags & MarkFirst) + { start = i; + last_zero_before_start = last_zero; + } if (flags & MarkLast) end = i + 1; @@ -114,6 +120,7 @@ struct RearrangementSubtable if (end - start >= l + r) { + c->buffer->unsafe_to_break (last_zero_before_start, i + 1); c->buffer->merge_clusters (start, end); hb_glyph_info_t buf[4]; commit 994eb7744c530bbaa5d6d8b8e07ca936e81aade8 Author: Behdad Esfahbod <beh...@behdad.org> Date: Thu Jan 11 11:37:12 2018 +0100 [buffer] Fix crash diff --git a/src/hb-buffer-serialize.cc b/src/hb-buffer-serialize.cc index 6a19c43c..11471941 100644 --- a/src/hb-buffer-serialize.cc +++ b/src/hb-buffer-serialize.cc @@ -182,7 +182,7 @@ _hb_buffer_serialize_glyphs_json (hb_buffer_t *buffer, } else return i - start; - if (flags & HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES) + if (pos && (flags & HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES)) { x += pos[i].x_advance; y += pos[i].y_advance; @@ -268,7 +268,7 @@ _hb_buffer_serialize_glyphs_text (hb_buffer_t *buffer, } else return i - start; - if (flags & HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES) + if (pos && (flags & HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES)) { x += pos[i].x_advance; y += pos[i].y_advance; commit d6076747ac6706b4d8361714d46aced9683c44a8 Author: Behdad Esfahbod <beh...@behdad.org> Date: Thu Jan 11 10:51:46 2018 +0100 [test/text-rendering-tests] Add DISABLED list diff --git a/test/shaping/data/text-rendering-tests/DISABLED b/test/shaping/data/text-rendering-tests/DISABLED new file mode 100644 index 00000000..7d63246c --- /dev/null +++ b/test/shaping/data/text-rendering-tests/DISABLED @@ -0,0 +1,20 @@ +# Non-Unicode cmap +tests/CMAP-3.tests + +# Not implemented +tests/MORX-1.tests +tests/MORX-2.tests +tests/MORX-3.tests +tests/MORX-4.tests +tests/MORX-5.tests +tests/MORX-6.tests +tests/MORX-7.tests +tests/MORX-8.tests +tests/MORX-9.tests + +# Rounding differences +tests/SHARAN-1.tests +tests/SHBALI-1.tests +tests/SHBALI-2.tests +tests/SHKNDA-2.tests +tests/SHKNDA-3.tests _______________________________________________ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/harfbuzz