ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Georg Duffner <g.duffner@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: LuaTeX has troubles with contextual kern
Date: Thu, 25 Apr 2013 08:08:05 +0200	[thread overview]
Message-ID: <5178C845.5000707@gmail.com> (raw)
In-Reply-To: <5177B815.7020206@wxs.nl>

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.a 
http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html#6.h 
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
___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2013-04-25  6:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24  9:07 Georg Duffner
2013-04-24 10:46 ` Hans Hagen
2013-04-25  6:08   ` Georg Duffner [this message]
2013-04-25  9:24     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5178C845.5000707@gmail.com \
    --to=g.duffner@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).