<html><head></head><body>I doubt this mod will end up in the a regression of positioning prebase matra in front of ligated cillu. I have seen Uniscribe too disregarding the pres rules. Not sure about its present status.<br>
<br>
-suresh<br><br><div class="gmail_quote">On 11 September 2014 14:36:37 GMT+05:30, Uvaraja Pandian <p.uvaraja@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr"><p class="MsoNormal" style="background-image:initial;background-repeat:initial">Hi Team,<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><u></u> <u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial">We are using the Harfbuzz 0.9.34 version.<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><u></u> <u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial">While rendering the Malayalam string using the Harfbuzz and Freetype engine, we see some issues.<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><u></u> <u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><b>String used: </b><span style="font-family:Kartika,serif">ക്കേ</span><u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><b>Unicode value:</b> 0x0d15, 0x0d4d, 0x0d15, 0x0d47, 0x0000 <u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><u></u> <u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><b>Harfbuzz Output:<u></u><u></u></b></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><img width="123" height="64" src="content://com.fsck.k9.attachmentprovider/eca1b9c8-2839-44ec-aeed-027f5ebd5d4e/35/RAW" /><u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><u></u> <u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><b>Proper Output :<u></u><u></u></b></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><img width="69" height="45" src="content://com.fsck.k9.attachmentprovider/eca1b9c8-2839-44ec-aeed-027f5ebd5d4e/36/RAW" /><u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><u></u> <u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><b>Font File used:</b> Akruti Family, Since this is a licensed font file, we are not able to share it.</p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><u></u> <u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><b>Issue in Detail:<u></u><u></u></b></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><u></u> <u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial">In the font file,<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial">script mlym {<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"> # Malayalam<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"> feature Akhands;<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"> feature BelowBaseSubstitutions;<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"> feature <b>HalfForms</b>;<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"> feature PostBaseForms;<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"> feature PostBaseSubstitutions;<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"> feature <b>PreBaseSubstitutions</b>;<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial">}<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><u></u> <u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(149,55,53)">As per the Harfbuzz implementation, below substitution is happening as part of the HalfForms ,<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(149,55,53)">0x0d15 & 0x0d4d </span><span style="font-family:Wingdings;color:rgb(149,55,53)">è</span><span style="color:rgb(149,55,53)"> XYZ character,<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(149,55,53)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(149,55,53)">so the output is XYZ, 0x0d15, 0x0d47<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(149,55,53)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(149,55,53)">Final re-ordering happens and rearranges as below,<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(149,55,53)">XYZ, 0x0d15, 0x0d47 </span><span style="font-family:Wingdings;color:rgb(149,55,53)">è</span><span style="color:rgb(149,55,53)"> XYZ, 0x0d47, 0x0d15<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(149,55,53)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(149,55,53)">As per the PreBaseSubstitutions,<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(149,55,53)">XYZ & 0x0d15 is not matched and the output is not proper.<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(0,176,80)">In-Order to solve this issue, below changes has been done,<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(0,176,80)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(0,176,80)">Final Re-ordering,<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(31,73,125)">PSB for the code changes<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(0,176,80)">As per the PreBaseSubstitutions,<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(0,176,80)">XYZ & 0x0d15 forms the final character.<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><b><span style="color:rgb(31,73,125)">Code Modifications:<u></u><u></u></span></b></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(31,73,125)">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,<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> if (start + 1 < end && start < base) /* Otherwise there can't be any pre-base matra characters. */<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> {<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> /* If we lost track of base, alas, position before last thingy. */<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> unsigned int new_pos = base == end ? base - 2 : base - 1;<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> </span><span style="color:rgb(13,13,13)">/* Malayalam / Tamil do not have "half" forms or explicit virama forms.<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(13,13,13)"> * The glyphs formed by 'half' are Chillus or ligated explicit viramas.<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(13,13,13)"> * We want to position matra after them.<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(13,13,13)"> */<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> if (buffer->props.script != HB_SCRIPT_MALAYALAM && buffer->props.script != HB_SCRIPT_TAMIL)<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> {<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> </span><span style="color:rgb(31,73,125)">…</span><span style="color:rgb(166,166,166)"><u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><s><span style="color:red"> }<u></u><u></u></span></s></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> if (start < new_pos && info[new_pos].indic_position () != POS_PRE_M)<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> {<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(31,73,125)"> …<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> } else {<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> </span><span style="color:rgb(31,73,125)">…</span><span style="color:rgb(166,166,166)"><u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> }<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166);background:maroon"> }</span><span style="color:rgb(166,166,166)"><u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(166,166,166)"> }<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(31,73,125)">Please comment, will it have any side effect.<u></u><u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial">Best Regards,<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial">Uvaraja P.<u></u><u></u></p><p class="MsoNormal" style="background-image:initial;background-repeat:initial">Sindhura P.</p></div>
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><br />HarfBuzz mailing list<br />HarfBuzz@lists.freedesktop.org<br /><a href="http://lists.freedesktop.org/mailman/listinfo/harfbuzz">http://lists.freedesktop.org/mailman/listinfo/harfbuzz</a><br /></pre></blockquote></div></body></html>