[HarfBuzz] unbreaking mixed-up khmer fonts

Jonathan Kew jfkthame at googlemail.com
Mon Nov 19 14:53:53 PST 2012


On 19/11/12 21:35, Jonathan Kew wrote:

> I've put a test page at http://people.mozilla.org/~jkew/kh/test.html
> that renders the sequences "ក្រុ ខេ គៀ" with 100+ fonts from several
> sources. They're mostly different versions of KhmerOS fonts, but there
> are a few others as well.
>
> Some initial observations:
>
> (a) The font "Sankor.ttf" fails completely; inspection shows that it
> lacks any OpenType features, either Indic-style or generic. So we can
> ignore that one.
>
> (b) A number of the fonts - colored red in the test page - are rejected
> by OTS (for having a bad OS/2 table; I haven't looked into details) in
> Firefox and Chrome, and so you'll get fallback to whatever your local
> default is. In Firefox, at least, you can set
> gfx.downloadable_fonts.sanitize to false in about:config (and reload the
> page) to bypass the sanitizer and see the actual fonts.
>
> (c) In current Firefox Nightly, which has harfbuzz
> 43b653150081a2f9dc6b7481229ac4cd952575dc, almost all the fonts shape
> correctly; the exception is Hanuman.
>
> (d) If I make the change suggested above, so that Khmer fonts with
> 'liga' are shaped via the Indic shaper (but with 'liga' disabled), this
> fixes Hanuman, but breaks a bunch of other fonts where the pre-base Ra
> no longer happens - in particular, all the KhUnicode210 collection, and
> a number of the KhmerUnicodeFonts. Many of those that break are the red
> samples that OTS would reject as webfonts, but some of the non-red ones
> break as well.
>
> (e) Of course, if we also revert the liga-disabling commit, a number of
> the fonts (all the KhUnicode210 faces, and about half the
> KhmerUnicodeFonts faces) exhibit the problem of doubling the left part
> of the matra in "គៀ", which was what started us into this morass.

Sorry, hit Send prematurely on this... I was going to add one further note:

(f) A considerable number of the fonts, including the Hanuman font 
that's currently appearing broken on http://khmer.rfa.org, don't load in 
IE9 at all. Some of them (including Hanuman) are rejected because of 
embedding permissions (IE9 insists the embedding flags must allow 
"installable embedding"), others generate generic "@font-face 
encountered unknown error" messages. However, Hanuman does work in IE9 
if installed locally.

JK




More information about the HarfBuzz mailing list