[HarfBuzz] Syllable formation issue
Behdad Esfahbod
behdad at behdad.org
Mon Sep 10 14:48:33 UTC 2018
HarfBuzz clusters are not designed to do that for you. You need Unicode
Text Segmentation for that:
http://unicode.org/reports/tr29/
Even that might not be what you want.
On Mon, Sep 10, 2018 at 4:46 PM, Vijendra Singh <visingh at quark.com> wrote:
> Hi All,
>
>
>
> I am integrating Indic languages in my application but not aware how to
> make syllables.
>
> Currently I am using cluster id to make syllable but it is failing for
> some case like-
>
> स + ् + व + ा + स + ् + थ + ् + य = स्वास्थ्य in “Arial Unicode MS” font
>
> Here I am getting length = 6 from fHbBuffer and
>
> cluster ids-
>
> + [0] {codepoint=7021 mask=10 cluster=0 ...}
>
> + [1] {codepoint=1431 mask=3 cluster=2 ...}
>
> + [2] {codepoint=1438 mask=7 cluster=2 ...}
>
> + [3] {codepoint=7021 mask=10 cluster=4 ...}
>
> + [4] {codepoint=7005 mask=11 cluster=6 ...}
>
> + [5] {codepoint=1425 mask=3 cluster=8 ...}
>
> on calling hb_shape
>
>
>
> So I’m getting six characters and 5 syllables. But expected behavior is
> that the word should contain only 2 syllables “स्वा” and “स्थ्य”.
>
>
>
> Please correct me if I’m using an incorrect approach to get the syllables.
>
>
>
> Also guide me the correct way to identify the syllables from the values
> returned by hb_shape function.
>
>
>
> Thanks,
>
> Vijendra Singh
>
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/harfbuzz
>
>
--
behdad
http://behdad.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/harfbuzz/attachments/20180910/84e2105d/attachment-0001.html>
More information about the HarfBuzz
mailing list