[HarfBuzz] Tai Tham NGA, SAKOT is not Kinzi

Theppitak Karoonboonyanan thep at linux.thai.net
Sat Apr 27 22:45:12 PDT 2013


On Fri, Apr 26, 2013 at 2:06 AM, Richard Wordingham
<richard.wordingham at ntlworld.com> wrote:
> On Thu, 25 Apr 2013 19:22:17 +0700
> Theppitak Karoonboonyanan <thep at linux.thai.net> wrote:
>
>> On Thu, Apr 25, 2013 at 8:55 AM, Richard Wordingham
>> <richard.wordingham at ntlworld.com> wrote:
>> > On Sun, 21 Apr 2013 22:07:53 +0700
>> > Theppitak Karoonboonyanan <thep at linux.thai.net> wrote:
>> >
>> >> This could be the solution we're seeking. But how should the font
>> >> do the signalling?
>> >
>> > The method used before was the presence or absence of a certain
>> > substitution within some feature.
>> >
>> > [in another mail]:
>> >
>> > According to
>> > http://lists.freedesktop.org/archives/harfbuzz/2013-January/002842.html ,
>> > the need for MEDIAL RA to be reordered is signalled by having a
>> > lookup for it in the 'pref' feature.  (I am not sure of the point of
>> > implementation of this.)  The same could be done for MAI KANG LAI in
>> > the 'abvf' feature.
>
>> In fact, the signal for that case is actually the presence of 'lana'
>> script tag. Harfbuzz will ignore all tables for 'DFLT' script tag if
>> 'lana' tag is present, to avoid the conflict with fallback rules.
>
> I'm not sure it has been implemented as described - perhaps this
> intended change has been abandoned.

I'm quite sure it has been implemented, as this is what Behdad told me
to do with my font, and it also works as expected.

>> So, what should be the contents of 'abvf' for signalling? Full
>> reordering rules or just emptiness? The latter is quite awkward
>> design, IMHO. For the former, I think it could be a single 'ccmp'
>> fallback with both 'DFLT' and 'lana' script tags instead, and
>> Harfbuzz doesn't need to handle Mai Kang Lai at all, *except*
>> allowing GSUB rules to be applied across text clusters.
>
> Having slept on the idea, I think 'pref' would be a more appropriate.
> As this is for items *before* the base consonant, it makes sense to
> exclude adjustments to MAI KANG LAI from that feature unless it is in
> some sense coming from before the base consonant.  Also, 'pref' is the
> first feature applied after rearrangement.
>
> The necessary condition for re-ordering would be the presence of the MAI
> KANG LAI glyph (as defined by the cmap table) in the initial character
> coverage for the 'pref' feature in GSUB.  I'm not sure if it is
> sufficient, or whether the lookup might have to be a single
> substitution.

It may looks quite tricky for a font feature to exist just for signalling
purpose without explicit definition.

> A bigger design change would be to require it in the
> 'rphf' feature, used for kinzi in the Myanmar script.  While this would
> be even better, at present the SEA shaper ignores the 'rphf' feature.

OK. I finally learn what 'rphf' is for from [1]. This looks more elegant.
I like it.

  [1] http://www.microsoft.com/typography/OpenTypeDev/myanmar/intro.htm

>> > I assume you're using the ligature substitution (look-up type 4)
>> > followed by the mulitiple substitution (look-up type 2).  One
>> > solution is to use different glyphs for swapped and unswapped MAI
>> > KANG LAI.
>>
>> OK. I've tried it and it works. The problem is that it only works in
>> Fontforge metrics window, not on Harfbuzz. It looks like Harfbuzz
>> does not allow GSUB rules to be applied across text cluster boundary
>> currently (while old Pango does).
>
> Which feature did you put it in, and which HarfBuzz shaper did you use?

It's 'ccmp', because I want the basic support on engines that don't support
Tai Tham preprocessing as well.

> In HarfBuzz, the features 'pref', 'abvf', 'blwf' and 'pstf' do not work
> across syllables in the SEA shaper.  I don't think 'locl' and 'ccmp'
> work across syllable boundaries in the SEA shaper either.

Right. That's probably why Behdad said it would be tricky when I first
raised the issue. But I think Tai Tham needs the Kinzi-like support.

> Without the ability to disable the rearrangement, editing the Khuen
> spelling ᩋᩘᨩᩮᩥ᩠ᨬ to the Maefahluang spelling ᩋᩢ᩠ᨦᨩᩮᩥ᩠ᨬ could be hard
> work. At the very least, <MAI KANG LAI, LOW CA, E, I> will be a single
> cluster!

I wouldn't be surprised. Editing phonetic order (aka. "logical" order, as
opposed to visual order) is already complicated by itself.

Regards,
--
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/



More information about the HarfBuzz mailing list