[HarfBuzz] [Harfbuzz] Issue in Malayalam String Rendering

Rajeesh K Nambiar rajeeshknambiar at gmail.com
Thu Sep 11 02:54:30 PDT 2014


On Thu, Sep 11, 2014 at 11:06 AM, Uvaraja Pandian <p.uvaraja at gmail.com>
wrote:

> Hi  Team,
>
>
>
> We are using the Harfbuzz 0.9.34 version.
>
>
>
> While rendering the Malayalam string using the Harfbuzz and Freetype
> engine, we see some issues.
>
>
>
> *String used: *ക്കേ
>
> *Unicode value:* 0x0d15, 0x0d4d, 0x0d15, 0x0d47, 0x0000
>
>
>
> *Harfbuzz Output:*
>
>
>
> *Proper Output :*
>
>
>
> *Font File used:* Akruti Family, Since this is a licensed font file, we
> are not able to share it.
>
>
>
> *Issue in Detail:*
>
>
>
> In the font file,
>
> script mlym {
>
>   # Malayalam
>
>   feature Akhands;
>
>   feature BelowBaseSubstitutions;
>
>   feature *HalfForms*;
>
>   feature PostBaseForms;
>
>   feature PostBaseSubstitutions;
>
>   feature *PreBaseSubstitutions*;
>
> }
>
>
>
> As per the Harfbuzz implementation, below substitution is happening as
> part of the HalfForms ,
>
> 0x0d15 & 0x0d4d è XYZ character,
>
>
>
> so the output is XYZ, 0x0d15, 0x0d47
>
>
>
> Final re-ordering happens and rearranges as below,
>
> XYZ, 0x0d15, 0x0d47 è XYZ, 0x0d47, 0x0d15
>

Does final_reordering happen before applying 'pres' lookup?


>
>
> As per the PreBaseSubstitutions,
>
> XYZ & 0x0d15 is not matched and the output is not proper.
>

>

If the font has a 'pres' rule for XYZ, 0x0D15, the conjunct should form
correctly.


> In-Order to solve this issue, below changes has been done,
>
>
>
> Final Re-ordering,
>
> PSB for the code changes
>
>
>
> As per the PreBaseSubstitutions,
>
> XYZ & 0x0d15 forms the final character.
>
>
>
> *Code Modifications:*
>
> In the file hb-ot-shape-complex-indic.cc, if we modify the lines as below
> in the function final_reordering_syllable() it is working,
>
>
>
>   if (start + 1 < end && start < base) /* Otherwise there can't be any
> pre-base matra characters. */
>
>   {
>
>           /* If we lost track of base, alas, position before last thingy.
> */
>
>           unsigned int new_pos = base == end ? base - 2 : base - 1;
>
>
>
>     /* Malayalam / Tamil do not have "half" forms or explicit virama
> forms.
>
>      * The glyphs formed by 'half' are Chillus or ligated explicit viramas.
>
>      * We want to position matra after them.
>
>      */
>
>           if (buffer->props.script != HB_SCRIPT_MALAYALAM &&
> buffer->props.script != HB_SCRIPT_TAMIL)
>
>          {
>
>>
>           }
>
>
>
>                        if (start < new_pos && info[new_pos].indic_position
> () != POS_PRE_M)
>
>                        {
>
>>
>                        } else {
>
>>
>                        }
>
>         }
>
>   }
>
>
>
> Please comment, will it have any side effect.
>
>
>
> Best Regards,
>
> Uvaraja P.
>
> Sindhura P.
>
>
>
>


-- 
Rajeesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20140911/719cfede/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1266 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20140911/719cfede/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2413 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20140911/719cfede/attachment-0001.jpg>


More information about the HarfBuzz mailing list