<div dir="ltr">Hey all,<div><br></div><div>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.</div><div><br></div><div>The screenshot below is text shaped by a single call to <font face="monospace, monospace">hb_shape</font>:</div><div><img src="cid:ii_1503e7e65545f21d" alt="Inline images 1" width="57" height="52"><br></div><div><br></div><div>The screenshot below is text where each character was shaped by a separate call to <font face="monospace, monospace">hb_shape</font> (the buffer used for each shape contained the full text as shaping context):</div><div><img src="cid:ii_1503e802d91fdb4b" alt="Inline images 2" width="57" height="50"><br></div><div><br></div><div>Clearly shaping has occurred, as the screenshot below shows each glyph un-shaped:</div><div><img src="cid:ii_1503e8112b2fca79" alt="Inline images 3" width="101" height="53"><br></div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>The font used was Amiri-Regular, and the text was "شكلي" (a sub-string taken from an <a href="http://ar.lipsum.com/">Arabic Lorem Ipsum generator</a>).</div><div><br></div><div>Thanks,</div><div>Jamie.</div></div>