Subject: bug#6026: 23.1.96; Cursor drawing problems with the Khmer script

From: Jason Rumney <[email-masked]>
Date: Wed, 28 Apr 2010 00:14:49 +0800

Eli Zaretskii <[email-masked]> writes:

>> Date: Tue, 27 Apr 2010 08:17:52 +0800
>> From: Jason Rumney <[email-masked]>
>> Cc: 
>> 
>> On 27/04/2010 01:27, Eli Zaretskii wrote:
>> >> From: Kenichi Handa<[email-masked]>
>> >> Cc: [email-masked]
>> >> Date: Mon, 26 Apr 2010 20:35:54 +0900
>> >>
>> >> I don't see that problem on my GNU/Linux systems.  Perhaps,
>> >> you have a font that contains Khmer characters but doesn't
>> >> have proper OpenType tables.
>> >>      
>> > How to know that?
>> >    
>> 
>> (list-fonts (font-spec :registry "iso10646-1" :otf '(khmr nil (pres))))
>
> This produces a long list, where I see Code2000 several times.  What
> am I looking for?

I'm surprised you get a long list for such a minority language - my
system only has "Khmer OS System", which I installed specifically for
Khmer support.

>> I doubt that has OTF tables for Khmer - try a Khmer specific font (I 
>> have one installed called "Khmer OS System")

Actually, it must have some otf tables for khmer, as it is one of the
fonts recommended for viewing of Khmer here (though prefixed with "quick
and dirty"):

http://www.bauhahnm.clara.net/Khmer/Welcome.html

Now that I've tried your original report on both GNU/Linux and Windows,
I see the bug on Windows. It may be due to the version of usp10.dll - I
remember when I originally worked on the uniscribe code, I had to
upgrade usp10.dll manually to get support for some languages - Tibetan
and Sinhalese I specifically remember, but there may have been others.
But according to info I've found, the last update to usp10.dll was
shipped as part of XP SP2, bringing Khmer support amongst others, so
there may be another bug here, or just a difference in the way uniscribe
maps glyphs compared to libotf which affects Khmer (and I think
Burmese) but not the Indic scripts.

Also, according to this page: 

  http://www.microsoft.com/typography/otfntdev/khmerot/features.aspx

the following otf gsub features are required to properly display Khmer:

  pref blwf abvf pstf pres blws abvs psts clig

So the following might be a better font spec, at least for Windows:

(font-spec :registry "iso10646-1" :otf '(khmr nil
                                        (pref blwf abvf pstf pres blws
                                         abvs psts clig)))