<div dir="ltr"><br><div class="gmail_extra">Hi, Martin, Richard, and Danh Hong,</div><div class="gmail_extra"><br></div><div class="gmail_extra">With regard to forcing the re-ordering of the UCD-enforced-but-totally-broken normalisation of TAI THAM TONE MARK plus U+1A60, does the following approach in the OpenType feature file make sense as the quickest and cleanest way to do it or not?:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Basically the idea is to compose the out-of-order pair of characters into a ligature; and then take that ligature and decompose it back to a pair of characters that are in the correct order:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">If there is a better way to do this in OpenType, please enlighten me! :-) I was trying to get this to work last night, so far without success:</div><div class="gmail_extra">
<p class="">lookup FixUCDSakotErrorComposition {</p>
<p class=""> lookupflag 0;</p>
<p class=""> sub \uni1A60 \uni1A75 by \uni1A60.uni1A75.lig;</p>
<p class=""> sub \uni1A60 \uni1A76 by \uni1A60.uni1A76.lig;</p>
<p class=""> sub \uni1A60 \uni1A77 by \uni1A60.uni1A77.lig;</p>
<p class=""> sub \uni1A60 \uni1A78 by \uni1A60.uni1A78.lig;</p>
<p class=""> sub \uni1A60 \uni1A79 by \uni1A60.uni1A79.lig;</p>
<p class="">} FixUCDSakotErrorComposition;</p>
<p class=""><br></p>
<p class="">lookup FixUCDSakotErrorDecomposition {</p>
<p class=""> sub \uni1A60.uni1A75.lig by \uni1A75 \uni1A60;</p>
<p class=""> sub \uni1A60.uni1A76.lig by \uni1A76 \uni1A60;</p>
<p class=""> sub \uni1A60.uni1A77.lig by \uni1A77 \uni1A60;</p>
<p class=""> sub \uni1A60.uni1A78.lig by \uni1A78 \uni1A60;</p>
<p class=""> sub \uni1A60.uni1A79.lig by \uni1A79 \uni1A60;</p>
<p class="">} FixUCDSakotErrorDecomposition;</p><p class=""><br></p><br><div class="gmail_quote">On Thu, Dec 26, 2013 at 8:52 AM, Martin Hosken <span dir="ltr"><<a href="mailto:mhosken@gmail.com" target="_blank">mhosken@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Dear Ed,<br>
<div><br>
> When shaping text, the correct ordering for your typical<br>
> consonant-vowel-consonant syllable is: BASE_CONSONANT + (i)VOWEL_MARK +<br>
> (ii) TONE MARK +(iv) U+1A60 SAKOT + (iii) SUBJOINED CONSONANT<br>
><br>
> With Harfbuzz 0.90, I get the shaping that I expect as shown in the first<br>
> image. But with the most recent versions of HarfBuzz including the latest<br>
> version (sorry, I don't know at which intermediate version things changed),<br>
> I get incorrect shaping, as shown in the 2nd image. These flaws are<br>
> apparent in the latest versions of Firefox too (which presumably contains<br>
> the latest HarfBuzz library unchanged in some statically linked form I<br>
> guess ... )<br>
><br>
> Can someone please give me a hint about what changed in HarfBuzz? Is this a<br>
> bug in HarfBuzz? Or is some definition in my OpenType feature file not<br>
> correct after changes were made in HarfBuzz?<br>
<br>
</div>The answer is simple but insidious.<br>
<br>
The normalization for Tai Tham is somewhat broken in that sakot has been given a lower combining order than a tone mark. Thus when text is normalized, the sequence cons + vowel + tone + sakot + cons, gets reordered to cons + vowel + sakot + tone + cons. I have tried very hard to get the UTC to fix this, but they absolutely refuse on the basis of stability. (Please don't get me started!).<br>
<br>
The best answer is to have the Tai Tham shaper re-reorder the wrong normalised order of sakot + tone + cons, back to tone + sakot + cons before allocating features, etc.<br>
<br>
Yours,<br>
Martin<br>
</blockquote></div><br></div></div>