<div dir="ltr">Hi Behdad,<br><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 17, 2015 at 6:31 PM, Behdad Esfahbod <span dir="ltr"><<a href="mailto:behdad@kemper.freedesktop.org" target="_blank">behdad@kemper.freedesktop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> src/hb-ot-shape-complex-indic.cc | 11 +++++++++--<br>
1 file changed, 9 insertions(+), 2 deletions(-)<br>
<br>
New commits:<br>
commit 508cc3d3cfcfb0383df0fe795cc28db4e0fd5729<br>
Author: Behdad Esfahbod <<a href="mailto:behdad@behdad.org">behdad@behdad.org</a>><br>
Date: Thu Dec 17 17:31:17 2015 +0000<br>
<br>
[indic] Allow context when matching for Malayalam new-spec<br>
<br>
Test sequence:<br>
U+0995,U+09CD,U+09B0<br></blockquote><div><br></div><div>These code points are for Bengali, they don't make sense for Malayalam. Could you share more details about this specific test case?<br></div><div>(I saw that subsequent commit 45b7ec365225109eb0854e6c417f48860b5f24af fixes regression introduced by this commit, that made me curious to look into this one).<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><br>
With Nirmala shipped on Windows 10, this failed to form the below form.<br>
Works now.<br>
<br>
Reported by Sairus.<br>
<br>
</span>diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc<br>
index 5354897..a630419 100644<br>
--- a/src/hb-ot-shape-complex-indic.cc<br>
+++ b/src/hb-ot-shape-complex-indic.cc<br>
@@ -557,8 +557,15 @@ data_create_indic (const hb_ot_shape_plan_t *plan)<br>
indic_plan->virama_glyph = (hb_codepoint_t) -1;<br>
<br>
/* Use zero-context would_substitute() matching for new-spec of the main<br>
- * Indic scripts, and scripts with one spec only, but not for old-specs. */<br>
- bool zero_context = !indic_plan->is_old_spec;<br>
+ * Indic scripts, and scripts with one spec only, but not for old-specs.<br>
+ * The new-spec for all dual-spec scripts says zero-context matching happens.<br>
+ *<br>
+ * However, testing with Malayalam shows that old and new spec both allow<br>
+ * context. Testing with Bengali new-spec however shows that it doesn't.<br>
+ * So, the heuristic here is the way it is. It should *only* be changed,<br>
+ * as we discover more cases of what Windows does. DON'T TOUCH OTHERWISE.<br>
+ */<br>
+ bool zero_context = !indic_plan->is_old_spec && plan->props.script != HB_SCRIPT_MALAYALAM;<br>
indic_plan->rphf.init (&plan->map, HB_TAG('r','p','h','f'), zero_context);<br>
indic_plan->pref.init (&plan->map, HB_TAG('p','r','e','f'), zero_context);<br>
indic_plan->blwf.init (&plan->map, HB_TAG('b','l','w','f'), zero_context);<br>
<div class=""><div class="h5">_______________________________________________<br>
HarfBuzz mailing list<br>
<a href="mailto:HarfBuzz@lists.freedesktop.org">HarfBuzz@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/harfbuzz" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/harfbuzz</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br></div><div class="gmail_extra">Cheers,<br></div><div class="gmail_extra"><div class="gmail_signature"><div dir="ltr">Rajeesh<br><br></div></div>
</div></div>