> From: Khaled Hosny <[email protected]>
> Date: Sun, 24 May 2020 18:00:45 +0200
> Cc: [email protected]
> 
> In general the safest is to pass the whole paragraph of text and the start 
> and length of each item (item being a run with same font, direction, script, 
> and language).

I was talking about text that has a single font, direction, script,
and language.

> This, for example, ensures that HarfBuzz can do basic Arabic-like shaping 
> across item boundaries e.g. if you break items in the middle of an Arabic 
> word (due to font change, for example), you still get the 
> initial/medial/final forms across the boundary as appropriate. Or to put a 
> combining mark at the start of a paragraph on a dotted circle as it otherwise 
> has no base.
> 
> If this is not possible, then you can try to pass enough context, like reach 
> back and forward to first character that is not a combining mark. This may or 
> may not be enough.
> 
> Shaping space-delimited words is orthogonal to that, context is better be 
> always provided.

So this sounds like passing a physical line that ends in a newline
should be good enough?  Or are there issues that cross newlines as
well?

And what is a "paragraph" in this context?

> Some fonts do have OpenType lookups that interact with space (e.g. kerning 
> pairs involving space, or even substitutions involving space), so shaping 
> words independently will give suboptimal result. You can use HarfBuzz API to 
> find out if the font has OpenType layout rules involving space, or decide to 
> live with this limitation.

Which API provides this information?

Thanks.
_______________________________________________
HarfBuzz mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to