<div dir="ltr"><div><div><div><div><div>As I understand it, MultiCharacterScanner is transforming a String of decomposed unicode into a string of pre-composed unicode code points, with help of UnicodeCompositionStream.<br>
</div><div>It store the result in presentation.<br></div><div><br></div>As I understand it, this was necessary because some keyboard/vm do produce such decomposed sequences.<br>I presume this once helped measuring and displaying those codes with fonts having only pre-composed codes.<br>
</div><br></div><div>First remark, this is a pity that the base character comes first, before the diacritical.<br></div><div>This forces the composition algorithm to look ahead.<br></div><div>We can&#39;t change it, it&#39;s a standard, but I wonder the motivation for such ordering...<br>
Ref: <a href="http://www.unicode.org/standard/principles.html">http://www.unicode.org/standard/principles.html</a><br></div><div><br></div><div>Second remark, transforming unicodes sequence to a canonical form is not only useful for measuring/displaying text.<br>
</div><div>It&#39;s usefull for comparing strings (for equality, for collation, ...)<br></div><div>So the transformation could happen somewhere else than at display time.<br></div><div><div>Unicode define standard ways to do it, and bad news, UnicodeCompositionStream is not conforming.<br>
</div>Ref: <a href="https://en.wikipedia.org/wiki/Unicode_equivalence">https://en.wikipedia.org/wiki/Unicode_equivalence</a><br></div><br></div><div>Third remark, I wonder if this composition is really necessary at all for measuring/displaying.<br>
</div>Doesn&#39;t unicode fonts provide special kerning pairs for those diacriticals?<br></div><div>I couldn&#39;t find good references on this one...<br></div><br></div>