From ccb0367dae4cbb9c8215dbf20ac7f9acfba2fa14 Mon Sep 17 00:00:00 2001 From: David Corbett Date: Fri, 2 Feb 2018 12:04:04 -0500 Subject: [PATCH] Let VS1 follow U+1031 MYANMAR VOWEL SIGN E --- src/hb-ot-shape-complex-myanmar-machine.rl | 2 +- src/hb-ot-shape-complex-myanmar.cc | 5 +++++ test/shaping/README.md | 10 +++++----- test/shaping/data/in-house/Makefile.sources | 1 + .../af3086380b743099c54a3b11b96766039ea62fcd.ttf | Bin 0 -> 1536 bytes .../data/in-house/tests/myanmar-syllable.tests | 1 + 6 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 test/shaping/data/in-house/fonts/af3086380b743099c54a3b11b96766039ea62fcd.ttf create mode 100644 test/shaping/data/in-house/tests/myanmar-syllable.tests diff --git a/src/hb-ot-shape-complex-myanmar-machine.rl b/src/hb-ot-shape-complex-myanmar-machine.rl index 45733ac73..0cd84fa1b 100644 --- a/src/hb-ot-shape-complex-myanmar-machine.rl +++ b/src/hb-ot-shape-complex-myanmar-machine.rl @@ -70,7 +70,7 @@ k = (Ra As H); # Kinzi c = C|Ra; # is_consonant medial_group = MY? MR? MW? MH? As?; -main_vowel_group = VPre* VAbv* VBlw* A* (DB As?)?; +main_vowel_group = (VPre.VS?)* VAbv* VBlw* A* (DB As?)?; post_vowel_group = VPst MH? As* VAbv* A* (DB As?)?; pwo_tone_group = PT A* DB? As?; diff --git a/src/hb-ot-shape-complex-myanmar.cc b/src/hb-ot-shape-complex-myanmar.cc index 5ea1dbff2..31bb976b1 100644 --- a/src/hb-ot-shape-complex-myanmar.cc +++ b/src/hb-ot-shape-complex-myanmar.cc @@ -374,6 +374,11 @@ initial_reordering_consonant_syllable (hb_buffer_t *buffer, { continue; } + if (info[i].myanmar_category() == OT_VS) + { + info[i].myanmar_position() = info[i - 1].myanmar_position(); + continue; + } if (pos == POS_AFTER_MAIN && info[i].myanmar_category() == OT_VBlw) { diff --git a/test/shaping/README.md b/test/shaping/README.md index 4c9a1e5dd..99498e60c 100644 --- a/test/shaping/README.md +++ b/test/shaping/README.md @@ -31,11 +31,11 @@ what this does is: $ ./hb-unicode-encode 41 42 43 627 | ./record-test.sh -o=data/in-house/tests/test-name.test ../../util/hb-shape font.ttf ``` -If you created a new test file, add it to `Makefile.am` so it is run. -Check that `make check` does indeed run it, and that the test passes. -When everything looks good, `git add` the new font as well as new -test file if you created any. You can see what new files are there -by running `git status data/in-house`. And commit! +If you created a new test file, add it to `data/in-house/Makefile.sources` +so it is run. Check that `make check` does indeed run it, and that the +test passes. When everything looks good, `git add` the new font as well +as the new test file if you created any. You can see what new files are +there by running `git status data/in-house`. And commit! *Note!* Please only add tests using Open Source fonts, preferably under OFL or similar license. diff --git a/test/shaping/data/in-house/Makefile.sources b/test/shaping/data/in-house/Makefile.sources index 247133d4c..1922fd4cd 100644 --- a/test/shaping/data/in-house/Makefile.sources +++ b/test/shaping/data/in-house/Makefile.sources @@ -29,6 +29,7 @@ TESTS = \ tests/mark-attachment.tests \ tests/mark-filtering-sets.tests \ tests/mongolian-variation-selector.tests \ + tests/myanmar-syllable.tests \ tests/spaces.tests \ tests/simple.tests \ tests/tibetan-contractions-1.tests \ diff --git a/test/shaping/data/in-house/fonts/af3086380b743099c54a3b11b96766039ea62fcd.ttf b/test/shaping/data/in-house/fonts/af3086380b743099c54a3b11b96766039ea62fcd.ttf new file mode 100644 index 0000000000000000000000000000000000000000..5945b16a6ac352630279e40643b8991873a7e2b2 GIT binary patch literal 1536 zcmZ`(Z)_7~7=P}rx1H_0Rau3^b?cUqU;?4-GMEejx32rLxVe7}(8zV`+J^SpwYSmL zr7j9A^73JZ#7)y_aIh3L`-7-aw*X)C3lWzXGYKYqFmpsACW?33x%#}Tq8H0Jnhna8F2ztW5nh3Sj6)obr36UU6&8g!?YU zJNy_hIJganClFWpLrUEA7MwsljJPx;#UoHikA|x#1+oMTC3%|5Q~ zcnk#0D1O4arMlzLfE;kx9WLEeJJ2|58XC~J8}0V|-hH>)LEVOMWGEW&`4!uio~LY1 zyQ6li%_R*6dTkBisK=`)o%vd@m{A@Iu|OPoIr!ld_>3uHe4mR8KdWBLjjxxMmv25> zx2taNp1t+gZl=E(3F{?>L?C|@Q^pU!sfERvD@3^0Zux%FJ=eb|h~rxQZ~xoo zBzb3a^4O~*$A`(V;7`jlGwJk989DRHyNNe_=U+^9KfLkGm>=gSYQL0d2P~&I0LL&- z)->gY^I+Mzp_Q4=rROFukSTKZ*n7!PxHs-43Qi zqokJ(4!v=?@}=V4cUcp+iV^s3(_LP-Z$G{G_hj}qdx?u9#`~LF4BlGi52#|6po-lH z^c|zPfMR+c7th{?gWM|S?qo0NEcr~`6oP@d!i)iOuqRpi#+}Mp<|a587Nfv(4<^`< z+Mowo`x<-Uve~*0oGn|69C4kU_JNDN2sZrT2`FWFO&P-@$Sxwz`7HV(bb<^4P{0c@ z)NN>eFaSZ2AWBcssVILHiV@`nnyq6lj}1_(?+M7mnyqHX=Bw+F%>w-E-}&**()FFJ z;XmCMVHUtXUF$q%E6qWS=bIflq4jUZ?*<