[morx] Fix MORX-35

Fixes https://github.com/harfbuzz/harfbuzz/issues/1224
This commit is contained in:
Behdad Esfahbod 2018-10-07 18:06:53 -04:00
parent 94368855c6
commit f62f6e90ad
3 changed files with 11 additions and 8 deletions

View File

@ -661,11 +661,17 @@ struct InsertionSubtable
* current glyph, the next glyph processed would in fact be the first * current glyph, the next glyph processed would in fact be the first
* one inserted." * one inserted."
* *
* This suggests that if DontAdvance is NOT set, we should move to * So, if DontAdvance *is* set, we move to "end", such that newly
* end+count. If it *was*, then move to end, such that newly inserted * inserted glyphs are visible.
* glyphs are now visible. *
* If DontAdvance is *not* set, if inserted before, move past them,
* such that original current glyph will be skipped over by the driver.
* Otherwise, again, just move to "end" such that current glyph will
* be skipped over by driver.
*
* https://github.com/harfbuzz/harfbuzz/issues/1224
*/ */
buffer->move_to ((flags & DontAdvance) ? end : end + count); buffer->move_to ((flags & DontAdvance) || !before ? end : end + count);
} }
if (flags & SetMark) if (flags & SetMark)

View File

@ -1,6 +1,3 @@
# https://github.com/harfbuzz/harfbuzz/issues/1224
tests/MORX-35.tests
# Non-Unicode cmap # Non-Unicode cmap
tests/CMAP-3.tests tests/CMAP-3.tests

View File

@ -55,6 +55,7 @@ TESTS = \
tests/MORX-32.tests \ tests/MORX-32.tests \
tests/MORX-33.tests \ tests/MORX-33.tests \
tests/MORX-34.tests \ tests/MORX-34.tests \
tests/MORX-35.tests \
tests/MORX-36.tests \ tests/MORX-36.tests \
tests/MORX-37.tests \ tests/MORX-37.tests \
tests/MORX-38.tests \ tests/MORX-38.tests \
@ -73,7 +74,6 @@ TESTS = \
DISBALED_TESTS = \ DISBALED_TESTS = \
tests/CMAP-3.tests \ tests/CMAP-3.tests \
tests/MORX-35.tests \
tests/SHARAN-1.tests \ tests/SHARAN-1.tests \
tests/SHBALI-1.tests \ tests/SHBALI-1.tests \
tests/SHBALI-2.tests \ tests/SHBALI-2.tests \