[HarfBuzz] Different results when shaping sub-sections of text

Jamie Dale jamiedale88+harfbuzz at gmail.com
Tue Oct 6 12:08:00 PDT 2015


Hey all,

We allow rich-text as part of our text layout system, and I've noticed that
I sometimes get different output when shaping sub-sections of text (for the
different rich-text styles) when compared to shaping the full text.

The screenshot below is text shaped by a single call to hb_shape:
[image: Inline images 1]

The screenshot below is text where each character was shaped by a separate
call to hb_shape (the buffer used for each shape contained the full text as
shaping context):
[image: Inline images 2]

Clearly shaping has occurred, as the screenshot below shows each glyph
un-shaped:
[image: Inline images 3]

I suspect that the first shape has used some ligatures, and the second
shape was unable to do that due to being unable to combine the glyphs (I
have previously seen this with the "fi" ligature in English).

If both of these forms are considered acceptable, then I'm happy enough,
however I'd just like to sanity check it as I'm not actually able to read
Arabic, so I can't say whether those differences are significant or somehow
incorrect.

The font used was Amiri-Regular, and the text was "شكلي" (a sub-string
taken from an Arabic Lorem Ipsum generator <http://ar.lipsum.com/>).

Thanks,
Jamie.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20151006/b5fa0afa/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 2521 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20151006/b5fa0afa/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 1947 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20151006/b5fa0afa/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 1821 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20151006/b5fa0afa/attachment-0002.png>


More information about the HarfBuzz mailing list