[NTG-context] \switchtobodyfont issue, also with newotf

Rik Kabel context at rik.users.panix.com
Thu Aug 20 20:34:10 CEST 2015


While working to get italic smallcaps in a secondary font face, I came 
across an issue with \switchbodyfont. When this is used in a certain 
way, the \tf font-style is changed, but not the \it, \bf, and so on.

The example below compiles cleanly as presented, and the problem is not 
present. Each test line shows the expected font name and text.

When the Oops! line is uncommented, the only test line for the test font 
that is correct is the \tf line. Other lines use the default font face 
in the specified font styles, but the font features are a mix (note that 
some are onum, some lining, and that long-s t ligatures are inconsistent).

When the newotf module is enabled, the example fails to compile without 
errors, but produces similar results to non-newotf when the errors are 
ignored.

This is not a problem with individual fonts—I have tried a variety of 
fonts both as default and secondary and get the same result.

    %\usemodule[newotf]
      \setupwhitespace[medium]
      \define\testAlphabet{\purefontname\font\quad
         ABCDEFGHIJKLmnopqrsſtuvwxyz \& 012345789}
      \starttypescript[Secondary]
    \definetypeface[Secondary][rm][serif][ebgaramond][default]
    % \definetypeface[Secondary][rm][serif][palatino][default]
    % \definetypeface[Secondary][rm][serif][libertine][default]
      \stoptypescript
      \setupbodyfont [modern, 10pt]
    %\setupbodyfont [palatino, 10pt]
      \starttext
    % {\switchtobodyfont[Secondary]Oops!\par}%          Oops!
       Default tf: {\tf \testAlphabet}\par
       Default bf: {\bf \testAlphabet}\par
       Default it: {\it \testAlphabet}\par
       Default sl: {\sl \testAlphabet}\par
       Default bi: {\bi \testAlphabet}\par
       Default bs: {\bs \testAlphabet}\par
       Default sc: {\sc \testAlphabet}\par
       Default xx: {\it\setff{smallcaps}\testAlphabet}\par
       \switchtobodyfont[Secondary]
       Secondary tf: {\tf \testAlphabet}\par
       Secondary bf: {\bf \testAlphabet}\par
       Secondary it: {\it \testAlphabet}\par
       Secondary sl: {\sl \testAlphabet}\par
       Secondary bi: {\bi \testAlphabet}\par
       Secondary bs: {\bs \testAlphabet}\par
       Secondary sc: {\sc \testAlphabet}\par
       Secondary xx: {\it\setff{smallcaps}\testAlphabet}\par
    \stoptext

Have I failed to properly specify the secondary typeface? Do I need a 
more complete typescript? Or is there a bug here?
-- 
Rik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150820/b312962e/attachment.html>


More information about the ntg-context mailing list