[HarfBuzz] Some (obsolete) khmer fonts not working (anymore) with harfbuzz
Jonathan Kew
jfkthame at googlemail.com
Mon May 13 03:41:56 PDT 2013
On 13/5/13 10:58, Olivier Berten wrote:
> Well... any string with coeng for instance. The string I'm using is:
> ពុម្ពអក្សរខ្មែរ
>
> Here are the results of
> hb-view --shapers=old Kh-Svayrieng.ttf ពុម្ពអក្សរខ្មែរ
> hb-view --shapers=ot Kh-Svayrieng.ttf ពុម្ពអក្សរខ្មែរ
OK, so the problem is triggered by the fact that these fonts (at least
the one I looked at) lack a 'pref' feature, and as such, harfbuzz-ng
does not process them with the Indic shaper (which would rely on this
feature for correct shaping). Instead, it sends them through the
"generic" shaper.
This works "correctly" for fonts that implemented *all* their behavior
using "generic" features such as 'liga' and 'clig', which people used to
do in order to get usable results from applications that did not really
support Indic or Khmer shaping at all.
However, in this case the font is using features such as 'abvs', 'blwf',
'pres', etc to do various aspects of the shaping. But these aren't
applied by the generic shaper.
So I think you'll get the "expected" results if you explicitly tell hb
to enable these features:
hb-view --features abvs,blwf,blws,pres,psts Kh-Svayrieng.ttf ពុម្ពអក្សរខ្មែរ
Not sure whether we should try to detect this and handle it
automatically somehow...
JK
More information about the HarfBuzz
mailing list