[HarfBuzz] Setting initial cluster value

Kelvin Ma kelvinsthirteen at gmail.com
Sat Jun 25 17:06:27 UTC 2016


> > > > Don’t you
> > > need
> > > > context to be ignored if the boundaries of the text you want to shape
> > > fall
> > > > inside a cluster? Like in the string 'af[fluency s]tate' where only
> the
> > > > 'fluency s' is supposed to be shaped?
> > >
> > > Depends on why you are shaping “fluency s” alone, if it is because of,
> > > say, font change, then you need HarfBuzz to know the context otherwise
> > > you get broken Arabic shaping.
> >
> > Well font change would produce a separate run that wouldn’t know about
> the
> > other runs so context can only be within a same-direction, same-font run.
>
> This is wrong, font change shouldn’t break Arabic shaping, so you have
> to pass the context even in this case.
>

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.


>
> > But would adding the context & using the start and finish indexes cause
> > latin ligatures like fi to get shaped when they shouldn’t be is what I’m
> > asking?
>
> No, they won’t, but why you would want to do that?
>

just asking to make sure


>
> Regards,
> Khaled
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/harfbuzz/attachments/20160625/6fa07c76/attachment.html>


More information about the HarfBuzz mailing list