Re: Multi-pass GSUB?



On Wed, 2004-09-29 at 13:06 +0700, Theppitak Karoonboonyanan wrote:
> Hello,
> 
> While testing my patch for Bug #153927 that proposes to disable hard-coded
> PUA substitution in Pango Thai module in favor of GPOS/GSUB tables if
> available, I find some sequences of GSUB rules are incompletely applied.
> They are rules for the combinations of tone marks and SARA AM (U+0E33),
> which require rules like this:
>   A    -> a1 a2 // decomposition
>   T a1 -> a1 T  // reordering with chain contextual subst.
> so that a string "TA" is to be processed like this:
>   T A -> T a1 a2 -> a1 T b2
> But what is actually done is just:
>   T A -> T a1 a2
> The next step seems to require either:
>   a) pango_ot_ruleset_substitute() be able to move back to previous
>      position (which is not the case for now), or
>   b) pango_ot_ruleset_substitute() be called twice for multi-pass
>      substitution.
> So, I would like to consult which one is the intended choice for the
> function call, so I'll revise my patch accordingly.

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,.

Regards,
					 Owen

(*) 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.

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]