Hi, Am 2013-04-24 12:46, schrieb Hans Hagen:
On 4/24/2013 11:07 AM, Georg Duffner wrote:
Hi,
in EB Garamond I have some contextual lookups in the kern feature with which LuaTeX in context standalone (updated today in the morning) seems to have problems (the issue is not new, I’ve already reported it in january but perhaps that was a bit too confusing).
The test document is:
\definefontfeature[default][default][mode=base]
you want node mode, so mode=node
I'm sorry, I forgot to mention it, I’ve already tested with mode=node, the result is exactly the same.
\definefontsynonym[ebg][file:EBGaramond12-Regular.otf] \definefontfeature[ss20][ss20=yes] \definefontfeature[iota1][cv81=1] \definefontfeature[iota2][cv81=2] \definefontfeature[altcirc][cv80=1] \define\test{Tì αᾟα\par} \starttext \definedfont[ebg*default at 12pt]\test \addfeature{ss20}\test \addfeature{iota1}\test \addfeature{iota2}\test \addfeature{altcirc}\test \stoptext
The font is at http://www.georgduffner.at/ebgaramond/fonts/EBGaramond12-Regular.otf
The corresponding lookups in the kern.fea roughly contain
pos T' 145 i.dotless gravecomb;
which increases the right sidebearing of T by 145 before i.dotless followed by gravecomb
maybe you also need to enable lfbd and rtbd?
lfbd and rtbd don’t make sense here, they are meant to by activated by opbd and only should affect left and right line-ends. They are the Opentype equivalents to protrusion settings. This is about "simple" kerning in the text (btw, there are experimental lfbd and rtbd settings in the font). This example is a standard kerning lookup (cf. http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html#6.... http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html#6.... and http://glyphsapp.com/blog/contextual-kerning/ )
and
pos Eta' <218 0 218 0> uni0345.cap @grk_tlAcc2; pos Eta' <218 0 418 0> uni0345.cap1 @grk_tlAcc2; pos Eta' <218 0 558 0> uni0345.cap2 @grk_tlAcc2;
where @grk_tlAcc2 contains the accents attached at the top left of the glyph and which means that Eta is positioned at 218 inside its bounding box and the bounding box is expanded by the third value between <>, on the condition that it’s followed by uni0345.cap* and the said accents.
ok, so that is effectively changing the advance width
Yes.
ss20 does a full decomposition of all composed glyphs so I can replace any component by an alternate glyph. Their order corresponds to canonical decomposition.
Attached you find the pdf output and a pdf from a parallel xelatex test which shows the desired result:
\documentclass[12pt]{minimal} \usepackage{fontspec} \setmainfont{EB Garamond} \newcommand{\test}{Tì αᾟα\par} \begin{document} \test \addfontfeature{RawFeature=+ss20}\test \addfontfeature{CharacterVariant=81:1}\test \addfontfeature{CharacterVariant=81:2}\test \addfontfeature{CharacterVariant=80}\test \end{document}
I don't know what \addfontfeature does in xetex (probably accumulative) but in context you can best use the \feature command: \feature[+][iota1] as \addfeature cum suis were somewhat experimental features related to oriental tex.
I’m a bit confused. As I don’t use context yet (this time I did for reporting a bug upon which I stumbled when using lualatex) I looked up the necessary commands in the newly presented "Fonts out of ConTeXt" where on p. 41 the commands \addfeature and \subtractfeature are used. In xelatex, \addfontfeature is defined by the package fontspec and does indeed accumulate features (much like I thought, \addfeature does in context) but without the need to be defined in the preamble and without the advantage to define feature sets. Best regards, Georg