<div dir="ltr">for the same reason kerning cannot happen between two different font runs, how can arabic shaping happen across different font runs?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 25, 2016 at 1:06 PM, Kelvin Ma <span dir="ltr"><<a href="mailto:kelvinsthirteen@gmail.com" target="_blank">kelvinsthirteen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span></span><br><span></span><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
> > > Don’t you<br>
> > need<br>
> > > context to be ignored if the boundaries of the text you want to shape<br>
> > fall<br>
> > > inside a cluster? Like in the string 'af[fluency s]tate' where only the<br>
> > > 'fluency s' is supposed to be shaped?<br>
> ><br>
> > Depends on why you are shaping “fluency s” alone, if it is because of,<br>
> > say, font change, then you need HarfBuzz to know the context otherwise<br>
> > you get broken Arabic shaping.<br>
><br>
> Well font change would produce a separate run that wouldn’t know about the<br>
> other runs so context can only be within a same-direction, same-font run.<br>
<br>
</span>This is wrong, font change shouldn’t break Arabic shaping, so you have<br>
to pass the context even in this case.<br></blockquote><div><br></div></span><div>If the text consists of text strings separated by formating objects, each text string doesn’t know about what’s around it. Because that’s at a much higher level in the code and harfbuzz can only handle a single font in a single run at a time. To artificially jam in the neighboring runs for each shaping attempt would involve an inordinate amount of string concatenation and searching on the fly.<br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span><br>
> But would adding the context & using the start and finish indexes cause<br>
> latin ligatures like fi to get shaped when they shouldn’t be is what I’m<br>
> asking?<br>
<br>
</span>No, they won’t, but why you would want to do that?<br></blockquote><div><br></div></span><div>just asking to make sure<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
Khaled<br>
</blockquote></div><br></div></div>
</blockquote></div><br></div>