On 9/5/2016 3:47 PM, Ulrike Fischer wrote:
Am Mon, 5 Sep 2016 15:19:03 +0200 schrieb Hans Hagen:
Is this a bug? And what exactly happens that luatex changes the
spacing?
many mechanisms have two branches: traditional and opentypemath and the
mathconstants table determines what branch is entered
math italics and kerning is different for both kind of fonts; so using a
math table for a type one math fonts or omitting one for opentype math
gives a mess
The problem is naturally that the use of the opentype math table
from libertine wasn't intentional. And if one isn't aware that it
has a mathcontants table if can have quite bewildering side effects
if one load the font for some symbols as the last mathcontants table
always wins. As an latex example:
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Cambria Math}
\setsansfont{Linux Libertine O}
\DeclareMathAlphabet
{\mathtest}{EU2}\sfdefault\mddefault\updefault
\begin{document}
\[
\int_{-\infty}^{\infty}a
\]
$\mathtest{abc}$
\[
\int_{-\infty}^{\infty}a
\]
\end{document}
I wonder if the fontloader code could offer some option to ignore
the mathconstants if one doesn't want them so that one has better
control about whose table will be used.
i can add something like this to the generic (won't be in context unless
i find a real good reason)
local function ignore(tfmdata,key,value)
if value then
tfmdata.mathparameters = nil
end
end
fonts.handlers.otf.features.register {
name = "ignoremathconstants",
description = "ignore math constants table",
initializers = {
base = ignore,
node = ignore,
}
}
untested of course
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------