ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* LuaTeX has troubles with contextual kern
@ 2013-04-24  9:07 Georg Duffner
  2013-04-24 10:46 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Georg Duffner @ 2013-04-24  9:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2135 bytes --]

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]
\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

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.

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}

Best regards,
Georg

[-- Attachment #2: contextual_kerning.pdf --]
[-- Type: application/pdf, Size: 7192 bytes --]

[-- Attachment #3: contextual_kerning_xtx.pdf --]
[-- Type: application/pdf, Size: 3392 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-25  9:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-24  9:07 LuaTeX has troubles with contextual kern Georg Duffner
2013-04-24 10:46 ` Hans Hagen
2013-04-25  6:08   ` Georg Duffner
2013-04-25  9:24     ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).