khaledhosny / luaotfload

Moved to https://github.com/latex3/luaotfload
23 stars 15 forks source link

Error found! Where to fix? feature file, contextual substitution #31

Closed rehmet closed 12 years ago

rehmet commented 13 years ago

Hello!

Works: sub [e] [t]' [c] by roundr;

Does not work: sub e t' c by roundr; sub [e]' [t]' [c] by roundr; (this was wanted)

Using LuaLaTeX 0.60 on miktex.

I would help, but I do not know, where to look.

Regards

rehmet commented 13 years ago

Workaround found:

this routine substitutes "et" of etc with \roundr. So you get \roundr c.

lookup subst_et { lookupflag 0; sub \e \t by \roundr ; } subst_et;

lookup alteretc { lookupflag 0; ignore sub [A-Z a-z] [\e]' [\t]' [\c] ; sub [\e]' [\t]' [\c] by ; } alteretc;

feature letc { script DFLT; language dflt ; lookup alteretc ;

script latn; language dflt ; lookup alteretc ; } letc;

rehmet commented 13 years ago

Further investigation:

otf-fonts and the feature file are merged in a tmp-font.lua. Apparently characters are read or written to the tmp-font.lua in incorrect order.

The order in the tmp-font.lua is correct, if I put in the before letters in the wrong order in the font.fea file:

ignore sub i e Z [t]' [z]' e u g e ; matches with Zeitzeuge.

I would expect to write:

ignore sub Z e i [t]' [z]' e u g e ; to match with Zeitzeuge.

So from the feature file to the tmp-font.lua file only the BEFORE letters are turned around.

Where do I have to look, to get this working in correct order?

Regards from Germany

khaledhosny commented 12 years ago

Not a bug, please check Adobe's feature file documentation, opentype spec or some font development discussion board.