[gpos] Fix unsafe-to-break of mark-attachment

This was undetected because most of the time marks were in same
cluster of their base already.

Fixes https://github.com/harfbuzz/harfbuzz/issues/3093
pull/3388/head
Behdad Esfahbod 3 years ago
parent c8195dbc01
commit 7e160dc347
  1. 2
      src/hb-ot-layout-gpos-table.hh
  2. 2
      test/shape/data/aots/tests/gpos4_simple.tests
  3. 2
      test/shape/data/aots/tests/gpos5.tests

@ -706,7 +706,7 @@ struct MarkArray : Array16Of<MarkRecord> /* Array of MarkRecords--in Coverage or
float mark_x, mark_y, base_x, base_y; float mark_x, mark_y, base_x, base_y;
buffer->unsafe_to_break (glyph_pos, buffer->idx); buffer->unsafe_to_break (glyph_pos, buffer->idx + 1);
mark_anchor.get_anchor (c, buffer->cur().codepoint, &mark_x, &mark_y); mark_anchor.get_anchor (c, buffer->cur().codepoint, &mark_x, &mark_y);
glyph_anchor.get_anchor (c, buffer->info[glyph_pos].codepoint, &base_x, &base_y); glyph_anchor.get_anchor (c, buffer->info[glyph_pos].codepoint, &base_x, &base_y);

@ -1,4 +1,4 @@
#../fonts/gpos4_simple_1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0011,U+0012,U+0013,U+0011;[17|18@1500,0|19@1400,-80|17@3000,0] ../fonts/gpos4_simple_1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0011,U+0012,U+0013,U+0011;[17|18@1500,0|19@1400,-80|17@3000,0]
../fonts/gpos4_simple_1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0011,U+0011,U+0013,U+0011;[17|17@1500,0|19@3000,0|17@3000,0] ../fonts/gpos4_simple_1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0011,U+0011,U+0013,U+0011;[17|17@1500,0|19@3000,0|17@3000,0]
../fonts/gpos4_simple_1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0019,U+0019,U+0013,U+0011;[25|25@1500,0|19@3000,0|17@3000,0] ../fonts/gpos4_simple_1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0019,U+0019,U+0013,U+0011;[25|25@1500,0|19@3000,0|17@3000,0]
#../fonts/gpos4_simple_1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0011,U+0012,U+0013,U+0013,U+0011;[17|18@1500,0|19@1400,-80|19@-100,-80|17@3000,0] #../fonts/gpos4_simple_1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0011,U+0012,U+0013,U+0013,U+0011;[17|18@1500,0|19@1400,-80|19@-100,-80|17@3000,0]

@ -1,2 +1,2 @@
../fonts/gpos5_font1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0011,U+001E,U+0013,U+001F,U+0011;[17|18@1500,0|19@1400,-80|17@3000,0] ../fonts/gpos5_font1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0011,U+001E,U+0013,U+001F,U+0011;[17|18@1500,0|19@1400,-80|17@3000,0]
#../fonts/gpos5_font1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0011,U+001E,U+001F,U+0013,U+0011;[17|18@1500,0|19@1401,-79|17@3000,0] ../fonts/gpos5_font1.otf;--features="test" --single-par --no-clusters --no-glyph-names --ned;U+0011,U+001E,U+001F,U+0013,U+0011;[17|18@1500,0|19@1401,-79|17@3000,0]

Loading…
Cancel
Save