<div dir="ltr"><div dir="ltr">HarfBuzz clusters are not designed to do that for you.  You need Unicode Text Segmentation for that:<br><br>  <a href="http://unicode.org/reports/tr29/">http://unicode.org/reports/tr29/</a><br><br></div><div>Even that might not be what you want.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 10, 2018 at 4:46 PM, Vijendra Singh <span dir="ltr"><<a href="mailto:visingh@quark.com" target="_blank">visingh@quark.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div class="m_8443481372355965121WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif"">Hi All,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif"">I am integrating Indic languages in my application but not aware how to make syllables.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif"">Currently I am using cluster id to make syllable but it is failing for some case like-
<u></u><u></u></span></p>
<p class="m_8443481372355965121BasicParagraph"><span style="font-family:"Mangal","serif"" lang="HI">स + ् + व + ा + स + ् + थ + ् + य
</span><span style="font-family:"Cambria","serif"" lang="EN-GB">= </span><span style="font-family:"Devanagari Sangam MN"" lang="HI">स्वास्थ्य</span><span style="font-family:"Cambria","serif"" lang="HI">
</span><span style="font-family:"Cambria","serif"" lang="EN-GB">in “Arial Unicode MS” font<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif"">Here I am getting length = 6 from
</span><span style="font-size:12.0pt;font-family:"Cambria","serif";color:black">fHbBuffer and
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif";color:black">cluster ids-<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:12.0pt;font-family:"Cambria","serif"">+                      [0]       {codepoint=7021 mask=10 cluster=0 ...}<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:12.0pt;font-family:"Cambria","serif"">+                      [1]       {codepoint=1431 mask=3 cluster=2 ...}<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:12.0pt;font-family:"Cambria","serif"">+                      [2]       {codepoint=1438 mask=7 cluster=2 ...}<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:12.0pt;font-family:"Cambria","serif"">+                      [3]       {codepoint=7021 mask=10 cluster=4 ...}<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:12.0pt;font-family:"Cambria","serif"">+                      [4]       {codepoint=7005 mask=11 cluster=6 ...}<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:12.0pt;font-family:"Cambria","serif"">+                      [5]       {codepoint=1425 mask=3 cluster=8 ...}<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:12.0pt;font-family:"Cambria","serif"">on calling
</span><span style="font-size:12.0pt;font-family:"Cambria","serif";color:black">hb_shape<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:12.0pt;font-family:"Cambria","serif";color:black"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:12.0pt;font-family:"Cambria","serif";color:black">So I’m getting six characters and 5 syllables. But expected behavior is that the word should contain only 2 syllables “</span><span style="font-size:12.0pt;font-family:"Devanagari Sangam MN"" lang="AR-SA">स्वा</span><span style="font-size:12.0pt;font-family:"Cambria","serif"">”
 and “</span><span style="font-size:12.0pt;font-family:"Devanagari Sangam MN"" lang="AR-SA">स्थ्य</span><span style="font-size:12.0pt;font-family:"Cambria","serif"">”</span><span style="font-size:12.0pt;font-family:"Cambria","serif";color:black">.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif";color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif"">Please correct me if I’m using an incorrect approach to get the syllables.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif"">Also guide me the correct way to identify the syllables from the values returned by hb_shape function.</span><span style="font-size:12.0pt;font-family:"Cambria","serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif"">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Cambria","serif"">Vijendra Singh<u></u><u></u></span></p>
</div>
</div>

<br>______________________________<wbr>_________________<br>
HarfBuzz mailing list<br>
<a href="mailto:HarfBuzz@lists.freedesktop.org">HarfBuzz@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/harfbuzz" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/harfbuzz</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">behdad<br><a href="http://behdad.org/" target="_blank">http://behdad.org/</a></div>
</div>