[HarfBuzz] unbreaking mixed-up khmer fonts

Jonathan Kew jfkthame at googlemail.com
Mon Nov 19 08:10:28 PST 2012


On 19/11/12 15:02, Behdad Esfahbod wrote:> On 12-11-19 07:58 AM, 
Jonathan Kew wrote:
 >> Hi Behdad,
 >>
 >> Hope you've had a good weekend - thanks for all the good work last week.
 >>
 >> One thing has come up: it seems we've broken things for some 
widely-used Khmer
 >> fonts. E.g. the font "hanuman.ttf" used on http://khmer.rfa.org/. 
This font
 >> has a 'liga' feature, but nevertheless relies on going through the indic
 >> shaper; it duplicates many of its lookups from 'abvs', etc., into 
'liga' and
 >> 'clig', but it does not use these features to do the pre-base vowel or
 >> subjoined consonants.
 >>
 >> The result is that it fails when shaped using the generic shaper, 
but works ok
 >> if we use the indic shaper with 'liga' disabled (because the 
features it puts
 >> in liga are just references to the lookups that are also in abvs etc, so
 >> ignoring liga is fine).
 >>
 >> And so I think we need to revert the Khmer part of
 >> 981748cb2e9b48b77177b19ec1f972cab7afda89 (but keep the Myanmar 
part), and rely
 >> only on 6b389ddc3623d042ded4731f4d62dc354002fdd0 to deal with the 
pre-base
 >> duplication that we were seeing with fonts like Kh-Battambang. 
Remind me if
 >> there's something else that would break?
 >
 > I think we were seeing Kh-Battang and family fail to do prebase 
reordering
 > because they don't have a pref features.  We started adding the 
hardcoded-Ra
 > support back for 'pref' stuff, but gave up since that was ugly.
 >
 > What do you think we should do now?
 >

Argh... yes, you're right, that breaks some (but not all) other fonts. 
There seem to be multiple versions of Kh-Battambang in circulation, for 
example; some will break, others won't. So I keep confusing myself by 
testing with varying versions. Sigh.

I'll experiment some more with the various fonts I have on hand...

JK




More information about the HarfBuzz mailing list