Re: [NTG-context] Kerning and ligatures in math roman font

2015-11-09 Thread Ulrike Fischer
Am Mon, 9 Nov 2015 14:22:45 +0100 schrieb Hans Hagen:

>> Yes, one workaround is to quit math mode. The other to use fonts in
>> mode "base". But I would like to understand why workarounds are
>> needed at all.
 
> because opentype math fonts are just math fonts (simple for text, rich 
> for math)

But there is no math font involved. This latex example

\documentclass{article}
\usepackage{fontspec}
\begin{document}
VA $\mathrm{VA}$
\end{document}

uses exactly one font:



But outside math it is kerned, inside not. 

And this plain tex example doesn't use math fonts either. 

\input luaotfload.sty

\font\Urm=Arial:mode=node;script=latn;language=DFLT;+tlig;+trep;
\textfont0\Urm
\Urm VA $\fam0 VA$ %no kerning in math

\font\Urmbase=Arial:mode=base;script=latn;language=DFLT;+tlig;+trep;
\textfont0\Urmbase
\Urm VA $\fam0 VA$ %kerning in math
\bye

(I used Arial so that one can see clearly that a text font is used)

-- 
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] Kerning and ligatures in math roman font

2015-11-09 Thread Ulrike Fischer
Am Mon, 9 Nov 2015 13:13:12 +0100 schrieb Hans Hagen:

>> In this example there is no kerning and no ligatures in the math:
>>
>> \starttext
>>   WAiff $\mfunction{WAiff}$
>> \stoptext
>>
>> This is a different behaviour than with legacy math fonts.
> 
> depends what legacy is ...

I meant the fonts you would get with plaintex or pdflatex.

>> A question about this has been asked some month ago on tex.sx
>> (http://tex.stackexchange.com/questions/252493/ligatures-are-not-used-in-opentype-maths-families).
>> The problem (or feature) exist also with xetex.
>>
>> With luatex one can avoid to loose the kerning by loading as math
>> roman font a font in mode base
>> (http://tex.stackexchange.com/questions/277362/lualatex-no-kerning-within-operatorname-when-not-loading-lmodern-package/277395#277395,
>> I have no idea how to do this in context).
>>
>> Is this a luatex/xetex bug? Or a feature? How could one enable
>> kerning and/or ligatures without going back to base mode?
 
> most math fonts don't have ligatures etc ... in fact, as ligatures are a 
> language/script related feature and math is the script it makes not much 
> sense either

But the plaintex and latex examples on tex.SX don't use a math font
for operatornames like \sin or for \mathrm (which seems to be
\mfunction in context). It is a text font and it has ligatures and
kerning informations, but they are not used in math. 

Doesn't use context for \mfunction a text font too? I thought so
because it has kerning when used outside math:

\starttext
\mfunction{WAiff}

$\mfunction{WAiff}$
\stoptext

Also bad kerning in operator names is a nuisance. I don't think that
the default result of
\definemathcommand[VA][nolop]{\mfunction{VA}} is good looking. 



> in context you can do:
> 
> \setupmathematics
>[functionstyle=normal]
> 
> which will use a box which then will trigger text fonts

Yes, one workaround is to quit math mode. The other to use fonts in
mode "base". But I would like to understand why workarounds are
needed at all. 


-- 
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] Kerning and ligatures in math roman font

2015-11-09 Thread Hans Hagen

On 11/9/2015 2:06 PM, Ulrike Fischer wrote:


Yes, one workaround is to quit math mode. The other to use fonts in
mode "base". But I would like to understand why workarounds are
needed at all.


because opentype math fonts are just math fonts (simple for text, rich 
for math)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] Kerning and ligatures in math roman font

2015-11-09 Thread Hans Hagen

On 11/9/2015 2:59 PM, Ulrike Fischer wrote:

Am Mon, 9 Nov 2015 14:22:45 +0100 schrieb Hans Hagen:


Yes, one workaround is to quit math mode. The other to use fonts in
mode "base". But I would like to understand why workarounds are
needed at all.



because opentype math fonts are just math fonts (simple for text, rich
for math)


But there is no math font involved. This latex example

\documentclass{article}
\usepackage{fontspec}
\begin{document}
VA $\mathrm{VA}$
\end{document}

uses exactly one font:



But outside math it is kerned, inside not.

And this plain tex example doesn't use math fonts either.

\input luaotfload.sty

\font\Urm=Arial:mode=node;script=latn;language=DFLT;+tlig;+trep;
\textfont0\Urm
\Urm VA $\fam0 VA$ %no kerning in math

\font\Urmbase=Arial:mode=base;script=latn;language=DFLT;+tlig;+trep;
\textfont0\Urmbase
\Urm VA $\fam0 VA$ %kerning in math
\bye

(I used Arial so that one can see clearly that a text font is used)


you don't enable kerning but anyhow, here is a context example:

\usemodule[oldotf]

\starttext

\showfontkerns

\font\Urm=arial:mode=node;+tlig;+trep;+kern;
\font\Urm=lmroman10-regular:mode=base;+kern;
\textfont0\Urm
\Urm VA $\fam0 VA$

\stoptext

basemode should work (no node mode in math but features are normal 
simple ... keep in mind that node lists in math are quite different)


Hans



--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] Kerning and ligatures in math roman font

2015-11-09 Thread Ulrike Fischer
Am Mon, 9 Nov 2015 16:44:34 +0100 schrieb Hans Hagen:

> you don't enable kerning but anyhow, 

In text mode kerning seems to be activated by default, but it
doesn't change the output if I add it.

> here is a context example:

Curious, here I get no kerning at all for arial. I tried all sort of
variants but the distance between V and A is wider then with
plaintex and \showfontkerns give no output. 


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

[NTG-context] Kerning and ligatures in math roman font

2015-11-09 Thread Ulrike Fischer
In this example there is no kerning and no ligatures in the math:

\starttext
 WAiff $\mfunction{WAiff}$
\stoptext

This is a different behaviour than with legacy math fonts. 

A question about this has been asked some month ago on tex.sx
(http://tex.stackexchange.com/questions/252493/ligatures-are-not-used-in-opentype-maths-families).
The problem (or feature) exist also with xetex. 

With luatex one can avoid to loose the kerning by loading as math
roman font a font in mode base
(http://tex.stackexchange.com/questions/277362/lualatex-no-kerning-within-operatorname-when-not-loading-lmodern-package/277395#277395,
I have no idea how to do this in context).

Is this a luatex/xetex bug? Or a feature? How could one enable
kerning and/or ligatures without going back to base mode? 


-- 
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] Kerning and ligatures in math roman font

2015-11-09 Thread Hans Hagen

On 11/9/2015 12:39 PM, Ulrike Fischer wrote:

In this example there is no kerning and no ligatures in the math:

\starttext
  WAiff $\mfunction{WAiff}$
\stoptext

This is a different behaviour than with legacy math fonts.


depends what legacy is ...


A question about this has been asked some month ago on tex.sx
(http://tex.stackexchange.com/questions/252493/ligatures-are-not-used-in-opentype-maths-families).
The problem (or feature) exist also with xetex.

With luatex one can avoid to loose the kerning by loading as math
roman font a font in mode base
(http://tex.stackexchange.com/questions/277362/lualatex-no-kerning-within-operatorname-when-not-loading-lmodern-package/277395#277395,
I have no idea how to do this in context).

Is this a luatex/xetex bug? Or a feature? How could one enable
kerning and/or ligatures without going back to base mode?


most math fonts don't have ligatures etc ... in fact, as ligatures are a 
language/script related feature and math is the script it makes not much 
sense either


in context you can do:

\setupmathematics
  [functionstyle=normal]

which will use a box which then will trigger text fonts

Hans

--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___