From 5585ea02eb90c013ddba73290d3a9ae435df9f15 Mon Sep 17 00:00:00 2001 From: David Corbett Date: Sat, 5 Jun 2021 08:35:28 -0400 Subject: [PATCH] [syllabic] Set position of dotted circle for Indic --- src/hb-ot-shape-complex-indic.cc | 3 ++- src/hb-ot-shape-complex-syllabic.cc | 5 ++++- src/hb-ot-shape-complex-syllabic.hh | 3 ++- .../fd07ea46e4d8368ada1776208c07fd596f727852.ttf | Bin 0 -> 956 bytes test/shaping/data/in-house/tests/cluster.tests | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 test/shaping/data/in-house/fonts/fd07ea46e4d8368ada1776208c07fd596f727852.ttf diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index a4f2d9a84..0594f3135 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -960,7 +960,8 @@ initial_reordering_indic (const hb_ot_shape_plan_t *plan, hb_syllabic_insert_dotted_circles (font, buffer, indic_broken_cluster, OT_DOTTEDCIRCLE, - OT_Repha); + OT_Repha, + POS_END); foreach_syllable (buffer, start, end) initial_reordering_syllable_indic (plan, font->face, buffer, start, end); diff --git a/src/hb-ot-shape-complex-syllabic.cc b/src/hb-ot-shape-complex-syllabic.cc index 46509abee..5a08f878d 100644 --- a/src/hb-ot-shape-complex-syllabic.cc +++ b/src/hb-ot-shape-complex-syllabic.cc @@ -34,7 +34,8 @@ hb_syllabic_insert_dotted_circles (hb_font_t *font, hb_buffer_t *buffer, unsigned int broken_syllable_type, unsigned int dottedcircle_category, - int repha_category) + int repha_category, + int dottedcircle_position) { if (unlikely (buffer->flags & HB_BUFFER_FLAG_DO_NOT_INSERT_DOTTED_CIRCLE)) return; @@ -61,6 +62,8 @@ hb_syllabic_insert_dotted_circles (hb_font_t *font, hb_glyph_info_t dottedcircle = {0}; dottedcircle.codepoint = 0x25CCu; dottedcircle.complex_var_u8_category() = dottedcircle_category; + if (dottedcircle_position != -1) + dottedcircle.complex_var_u8_auxiliary() = dottedcircle_position; dottedcircle.codepoint = dottedcircle_glyph; buffer->clear_output (); diff --git a/src/hb-ot-shape-complex-syllabic.hh b/src/hb-ot-shape-complex-syllabic.hh index c80b8fee1..b901a660d 100644 --- a/src/hb-ot-shape-complex-syllabic.hh +++ b/src/hb-ot-shape-complex-syllabic.hh @@ -35,7 +35,8 @@ hb_syllabic_insert_dotted_circles (hb_font_t *font, hb_buffer_t *buffer, unsigned int broken_syllable_type, unsigned int dottedcircle_category, - int repha_category = -1); + int repha_category = -1, + int dottedcircle_position = -1); #endif /* HB_OT_SHAPE_COMPLEX_SYLLABIC_HH */ diff --git a/test/shaping/data/in-house/fonts/fd07ea46e4d8368ada1776208c07fd596f727852.ttf b/test/shaping/data/in-house/fonts/fd07ea46e4d8368ada1776208c07fd596f727852.ttf new file mode 100644 index 0000000000000000000000000000000000000000..21e22460b89c84276be826139a95b26fb5efafab GIT binary patch literal 956 zcmZuvOK1~O6g}@vKGl+lP^Ch_saj}Cs_7VGmDoj-c2(P;;-XpDF-en3ex#|i=wc9E zRJsrZ-E`HR8&?(-Ma6ZuDg;4`E=pEK5I@k2=S@Zt?0d}Id+s~;-1|Nd06JkoLuBgW z31eZ^8v(>?MrSf5vpU`zcnV0Jcp`7kS8bb2Xitbc^2Mdub2}^D^k49sDdf!Tq0^0* z%%32R6&TPSi$}z(#K#Jy`l2V(x<-7PxVu=%n3zJCI8GcanTu8I;e_ZR*2`uo7qt3+ zv3`;GN3}9ve|YoDPu9;8PeQbs;*H&qhU!V2JaDwt+}@T(mB0?ky!}k>z|ZVx%sANP zJMw-YJ}?lM_ea9v5mgj1L`6|piW74=v9y&=TMw2^bJ-*V@Sy{eR`GWq0UYM!sW}X? zp5NL3_R7BaH*{)SD&@oGEB37HyU(pAX+`$M^K*5H(JL+~hFY~l$`fnsj#>_LTCBD6 z{_DX9kGLW3!As^{scvDVZN(=H3HB}F<=LoVSt?t1eDzDsj%9i8df$eo+ryZ4Dz*3U zhod|7)b5o=7yneC^mR>2&NvxdaEBk$O2xxF z#wfqGFWBa&>q`WYbbY=_TyTBQKO8T5aLbMRoOl8iRI!8_=8#7Lb#AmD8H8vJsu&pJ zJJYFb;yO85`YNY}tH_aEM~anl%w0f{oEpZtT4r3?8sj-;oaL8tZ486Fp~1iEm&vGM zp4uu;XT9UBtESElonfz&z1#3Hs0k@F;SpZ{LU}Hdj3!+>rmPW(IM_IqNH_w5r!9X2 DkI0}# literal 0 HcmV?d00001 diff --git a/test/shaping/data/in-house/tests/cluster.tests b/test/shaping/data/in-house/tests/cluster.tests index f1889900b..d5cf81495 100644 --- a/test/shaping/data/in-house/tests/cluster.tests +++ b/test/shaping/data/in-house/tests/cluster.tests @@ -1,3 +1,4 @@ ../fonts/4fac3929fc3332834e93673780ec0fe94342d193.ttf:--cluster-level=2:U+0078,U+030A,U+0058,U+030A:[gid2=0+1083|gid3=1@-1132,-8+0|gid1=2+1200|gid3=3@-1190,349+0] ../fonts/43ef465752be9af900745f72fe29cb853a1401a5.ttf:--cluster-level=1:U+05D4,U+05B7,U+05E9,U+05BC,U+05C1,U+05B8,U+05DE,U+05B4,U+05DD:[uni05DD=8+1359|uni05B4=7@111,0+0|uni05DE=6+1391|uni05B8=5+0|uni05BC=3+0|uni05C1=3+0|uni05E9=2+1451|uni05B7=1@28,0+0|uni05D4=0+1338] ../fonts/6f36d056bad6d478fc0bf7397bd52dc3bd197d5f.ttf:--cluster-level=1:U+099B,U+09CB,U+09C8,U+09C2,U+09CB,U+098C:[evowelsigninibeng=0+346|aivowelsignbeng=0+346|evowelsignbeng=0+346|chabeng=0+687|uuvowelsignlongbeng=0@-96,0+0|aavowelsignbeng=0+266|aavowelsignbeng=4+266|lvocalicbeng=5+639] +../fonts/fd07ea46e4d8368ada1776208c07fd596f727852.ttf:--cluster-level=1:U+0D4E,U+0D4D,U+200D:[uni0D4E=0+0|uni25CC=0+418|uni0D4D=0+0|space=0+0]