Re: [NTG-context] font features in math

2016-05-02 Thread Ulrike Fischer
Am Mon, 2 May 2016 18:47:36 +0200 schrieb Philipp Gesang:

>> How can you switch a feature like mode=node to mode=base for
>> every font in math?

> Define two fonts: one for use in math mode, another for where you
> really, really require node mode.

That's easy if one can select the fonts explicitly, but the question
was triggered by the url package which internally switches to math. 

Also in the context example there aren't two font definitions:

\starttext

\font\test= {name:TeX-Gyre-Termes:+onum}
\test 0123456789
$\fam0 \textfont0=\test 0123456789$ 
\stoptext

Nevertheless "\test" seems to use mode=node outside math and
mode=base inside math and I would like to know where the code is
that does it.


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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
___

Re: [NTG-context] font features in math

2016-05-02 Thread jfbu

Le 2 mai 2016 à 20:15, jfbu  a écrit :

> 
> 
>> \font\fixmath=\fontname\textfont\foo mode=base;
>> \textfont\foo=\fixmath
> 
> I will use a better approach as this one does not work
> when the thing ends as "at 7.0pt" for example, but in principle
> I see I can do surgery on the \fontname and replace there
> mode=node if it exists with mode=base.
> 
> I only have to figure out the best time to do that
> in a context (no pun intended) where people may change
> "\mathversion" (latex thing).
> 

\begingroup
\catcode`N 12
\catcode`O 12
\catcode`D 12
\catcode`E 12
\lowercase{\gdef\FixMathFont@i #1=NODE;#2\relax #3}%
  {\font\fixmath=#1=base;#2\relax\global#3\symmtoperatorfont=\fixmath}
\endgroup

\def\FixMathFont 
{\setbox0\hbox{\MTeverymathoff$\relax$%
 \expandafter\FixMathFont@i\fontname\textfont\symmtoperatorfont\relax\textfont
 
\expandafter\FixMathFont@i\fontname\scriptfont\symmtoperatorfont\relax\scriptfont
 
\expandafter\FixMathFont@i\fontname\scriptscriptfont\symmtoperatorfont\relax\scriptscriptfont}%
}

I only need to add the layer to do nothing if "=node" is not found, and 
we are allset.

Jean-François

___
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
___

Re: [NTG-context] Handling Semi-Bold for Minion Pro in Context (LuaTeX)

2016-05-02 Thread Wolfgang Schuster

Antoine Cailliau 
2. Mai 2016 um 11:19
Hello,

I'm trying to use the font Minion Pro for my document. I'm using the 
simplefont module but I cannot use the semibold font. I guess I'm 
missing some line in the configuration to bind sb to the semibold variant.
The \definefontfamily command is limited to the default alternatives 
(tf, bf, it, sl, bi, bs ans sc).


Wolfgang
___
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
___

Re: [NTG-context] Garamond Premier Pro font goodies file

2016-05-02 Thread Wolfgang Schuster

mass...@fastwebnet.it 
28. April 2016 um 10:58
Hello list,
I'm using the Adobe Garamond Premier Pro font.
It has 4 optical sizes: Caption, Normal, Subhead, Display.
I tried to modify ebgaramond.lfg to adapt it to Garamond Premier Pro.
You find it as an attachment.

I don't know how to use that goodies file to see the different optical 
sizes

in a document. I've tried this:

\loadfontgoodies[GaramondPremierPro]

\definefontfamily [default] [rm] [tf=name:GaramondPremierPro-Regular,
it=name:GaramondPremierPro-Italic]

\setupbodyfont[default,12pt]

\dostepwiserecurse {6} {22} {1} {
\definebodyfontenvironment[default][#1pt][text=#1pt,em=italic]
}

\starttext

\dostepwiserecurse {6} {22} {1} {
\switchtobodyfont[#1pt]
\purefontname\font: \input tufte
\blank
}

\stoptext

but it does not work. Any help?

%\definefontfamily [default] [rm] [GaramondPremierPro] [opticalsize=yes]
\definefontfamily [default] [rm] [Latin Modern Roman] [opticalsize=yes]

\setupbodyfont[default,12pt]

\starttext

\dostepwiserecurse {6} {22} {1}
  {\switchtobodyfont[#1pt]
   \purefontname\font: \input ward
   \blank}

\stoptext

Wolfgang
___
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
___

Re: [NTG-context] font features in math

2016-05-02 Thread jfbu


> \font\fixmath=\fontname\textfont\foo mode=base;
> \textfont\foo=\fixmath

I will use a better approach as this one does not work
when the thing ends as "at 7.0pt" for example, but in principle
I see I can do surgery on the \fontname and replace there
mode=node if it exists with mode=base.

I only have to figure out the best time to do that
in a context (no pun intended) where people may change
"\mathversion" (latex thing).

Jean-François



___
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
___

Re: [NTG-context] font features in math

2016-05-02 Thread jfbu

Le 2 mai 2016 à 18:47, Philipp Gesang  a écrit :

> ·
> 
>> Am Sun, 1 May 2016 11:45:02 +0200 schrieb Philipp Gesang:
>> 
 So somehow in math the +onum is lost in plain and latex but not in
 context. What is context doing differently to avoid this?
>>> 
>>>mode=base
>> 
>> If context attach mode=base to math, how does it it?
> 
> A one would do in Luaotfload: specify base mode when defining the
> font. It’s unrelated to math, just the default set of features
> that Luaotfload has been applying to every definition for ages.
> The reasoning -- by Khaled and others -- was, that the Opentype
> standard mandates some defaults so Luaotfload should follow suit.
> 
> The defaults can be overridden by setting the appropriate values
> in luaotfload.conf(5).
> 
>> How can you
>> switch a feature like mode=node to mode=base for every font in math?
> 
> Define two fonts: one for use in math mode, another for where you
> really, really require node mode.
> 
> Philipp


Ulrike, thanks a lot for keeping asking questions on this and Philipp
for answering.

I have figured experimentally that I could use (at least in some cases,
and after math fonts are initialized which in LaTeX seems to mean
one needs to enter math mode at least once before)

\font\fixmath=\fontname\textfont\foo mode=base;
\textfont\foo=\fixmath

for example creating this \fontname:

[Vollkorn-Regular]:mode=node;script=latn;language=DFLT;+tlig;+lnum;mode=base;

which is then experimentally observed to obey the second mode specifier
and thus does display lining figures in math mode.

Jean-François
___
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
___

Re: [NTG-context] font features in math

2016-05-02 Thread Philipp Gesang
·

> Am Sun, 1 May 2016 11:45:02 +0200 schrieb Philipp Gesang:
> 
> >> So somehow in math the +onum is lost in plain and latex but not in
> >> context. What is context doing differently to avoid this?
> > 
> > mode=base
> 
> If context attach mode=base to math, how does it it?

A one would do in Luaotfload: specify base mode when defining the
font. It’s unrelated to math, just the default set of features
that Luaotfload has been applying to every definition for ages.
The reasoning -- by Khaled and others -- was, that the Opentype
standard mandates some defaults so Luaotfload should follow suit.

The defaults can be overridden by setting the appropriate values
in luaotfload.conf(5).

>  How can you
> switch a feature like mode=node to mode=base for every font in math?

Define two fonts: one for use in math mode, another for where you
really, really require node mode.

Philipp



pgp5j7EyuLGpU.pgp
Description: PGP signature
___
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
___

[NTG-context] Handling Semi-Bold for Minion Pro in Context (LuaTeX)

2016-05-02 Thread Antoine Cailliau
Hello,

I'm trying to use the font Minion Pro for my document. I'm using the
simplefont module but I cannot use the semibold font. I guess I'm missing
some line in the configuration to bind sb to the semibold variant. Here is
a short example of my setup:

\definefontalternative[sb]
\definefontalternative[sbi]

\definefontfeature[default][default]
[mode=node,
script=latn,
kern=yes,
palt=yes,
tlig=yes,
trep=yes,
init=yes,
size=yes]
\definefontfeature[frac][default][frac=yes]
\definefontfeature[sups][default][sups=yes]
\definefontfeature[onum][default][onum=yes]
\definefontfeature[lnum][default][lnum=yes]

\definefontfamily [myfamily] [serif] [MinionPro]
\definefontfamily [myfamily] [sans]  [MyriadPro]

\setupbodyfont [myfamily]

\define[1]\sup{\feature[+][f:superscript]#1}
\defineparagraphs[TwoColumns][n=2, align={hz, hanging}]
\setupparagraphs[TwoColumns][1][width=100pt, style=italic, align=left]

\starttext

\startbuffer[Plato]
How you, O Athenians, have been affected by my accusers, I cannot tell;
but I know that they almost made me forget who I was--so persuasively
did they speak; and yet they have hardly uttered a word of truth.
\stopbuffer

\startTwoColumns
Roman\TwoColumns
\getbuffer[Plato]
\stopTwoColumns

\startTwoColumns
Italic\TwoColumns
{\it\getbuffer[Plato]}
\stopTwoColumns

\startTwoColumns
Semi bold\TwoColumns
{\sb\getbuffer[Plato]}
\stopTwoColumns

\startTwoColumns
Bold\TwoColumns
{\bf\getbuffer[Plato]}
\stopTwoColumns

\startTwoColumns
Semi bold italic\TwoColumns
{\sbi\getbuffer[Plato]}
\stopTwoColumns

\startTwoColumns
Bold italic\TwoColumns
{\bi\getbuffer[Plato]}
\stopTwoColumns

\stoptext

Any help is deeply welcome,

Antoine
___
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
___