Re: Pango Feature Apply Order



As OpenType specification says, and you said in
http://bugzilla.gnome.org/show_bug.cgi?id=122330 "OpenType lookups need
to be ordered ... by the order the features are specified in the spec
for OpenType fonts for the particular language".

But, i think the patch in the bug does not do this, because the order
that lookups came in font is not the order they have to be applied. 

As this occures in many fonts like ArabTypesetting of MSVOLT. For
example, if the font has its "fina" feature's lookups after the "liga"
feature's lookups, LamAlef Ligature can not be rendered this way!

As OpenType specification says, two features can have same lookup, so we
cannot apply the lookup only once(As this happens in Arabic "liga"
feature: Many font developers copy the feature record and lookups of
"rlig" to "liga", because they can be applied after "calt" feature or
just for backward compatibility).
So I think the patch in the bug cannot solve the problem, unfortunately.

In my patch , first, I assume that any Shape Engine add its required
features by order it needs to GSUB and GPOS (I know this is not a true
assumption, and I'm working on it for Arabic Shape Engine, but if the
features occures in by the order specified in language specification it
works good!!!).
In my patch, instead of iterating on lookup list it iterates on feature
list of the table (gsub or gpos structures) and for each feature
iterates on lookup list of that feature. 

Best Regards
Soheil Hassas Yeganeh






On Sun, 2003-12-28 at 17:36, Owen Taylor wrote:
> How does your patch compare to the patch in:
> 
>  http://bugzilla.gnome.org/show_bug.cgi?id=122330
> 
> ?
> 
> Thanks,
> 					Owen
> 
> On Sun, Dec 28, 2003 at 05:04:33PM +0330, Soheil Hassas Yegnaneh wrote:
> > Dear All,
> > 
> > As OpenType specification says any script has a specific order of
> > features to apply (e.g. in Arabic, lookups of "ccmp" feature has to be
> > applied first and lookups of "dlig" feature has to be applied if user
> > asked for). But, current version of Pango applies lookups by order they
> > came in the font, instead of applying lookups by the order of the
> > features.
> > 
> > In order to fix this problem, I've modified TT_(GSUB|GPOS)_Apply_String
> > functions of pango/opentype/ftxg(sub|pos).c.
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list




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