Reputation: 5359
Recently, I came across Harfbuzz for text shaping, specifically for Indic texts. In my previous experience, I used ArabicShaping for shaping Arabic characters. In this case, the input is the pre-shaped text and the output is the shaped one.
In Harfbuzz, however, I can see the shape method shapes the text and returns the glyphs and the clusters instead. My objective is to convert the pre-shaped text to a shaped one. I don't want to draw/view the text. I just want a char[] which will contain the shaped one (just like in case of ArabicShaping).
Upvotes: 0
Views: 623
Reputation: 376
ArabicShaping must have confused you. There's no such thing as "pre-shaped text" in general. What do you mean "convert the pre-shaped text to a shaped one"? Shaping, what HarfBuzz does, converts from characters to glyphs. The reverse is a non-deterministic process that HarfBuzz does NOT provide.
Upvotes: 2