Re: Multi-pass GSUB?
- From: Theppitak Karoonboonyanan <thep linux thai net>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Multi-pass GSUB?
- Date: Thu, 30 Sep 2004 10:19:11 +0700
On Wed, Sep 29, 2004 at 11:16:18AM -0400, Owen Taylor wrote:
> pango_ot_ruleset_subsitute() applies each lookup in the font separately
> one after each other.
>
> The ordering that lookups are applied is:
>
> A) First by order that features are added by the shaper
> B) Within each feature, by the order of lookups for the feature
> specified by the font.
>
> Are you sure that the font and the shaper are set up to give the
> correct ordering for your font?
>
> The Microsoft Thai OpenType spec doesn't specify any features for
> reordering (*), but generally the 'ccmp' feature used for decomposition
> is always the first feature applied, so any other features should
> be after this,.
Umm.. Actually, the reordering rules were cheats, by exploiting the
chain sub. For example, to reorder "x y" to "y x", I assigned y as a
simple substitution of x, and vice versa. Then, the chain sub rules knew
how to select substitution based on context. Fortunately, the number of
such combinations were small enough to list all.
Regarding the rule ordering, could you suggest a reliable way to check?
I have used ttx to dump the font and found that the decomposition comes
first as you explained.
Actually, I haven't looked at the internal code of
pango_ot_ruleset_substitute() yet. My previous guess of its behavior
was empirical based on the fact that a quick hack by calling it twice
just made the rules completely applied. Just not sure if that's the
right thing.
> (*) As a general rule, in the OpenType language specs reordering tends
> to be done by the shaper rather than the font, because OpenType
> doesn't really handle reordering very nicely.
Hmm.. But the decompisition is in the font. This implies some intrusion
of the shaper in between the substitution process, or it should take
over the job completely as preprocessing. Hmm, The latter also sounds
good.
Thanks for your help,
-Thep.
--
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]