[XeTeX] why does Latin Modern Mono have some stretch and shrink with XeTeX ?

jfbu jfbu at free.fr
Tue Jan 24 19:20:21 CET 2017


Hi,

test file

% Tested with TeXLive 2016, up-to-date.

% xetex
\XeTeXtracingfonts=1
\font\test="[lmmono10-regular.otf]"\test

% result otherwise with luatex:
% (I don't know how to load font with luatex without luaotfload.sty)
%\input luaotfload.sty
%\font\test=[lmmono10-regular]:\test

\the\fontdimen2\font
\quad
\the\fontdimen3\font
\quad
\the\fontdimen4\font

\nopagenumbers
\bye

xetex: 5.25pt 2.625pt 1.75pt

Requested font "[lmmono10-regular.otf]" scaled 1000
 -> /usr/local/texlive/2016/texmf-dist/fonts/opentype/public/lm/lmmono10-regula
r.otf
 [1] )

luatex:5.25pt 0.0pt 0.0pt

</usr/local/texli
ve/2016/texmf-dist/fonts/opentype/public/lm/lmmono10-regular.otf>

% Local variables:
% TeX-engine: xetex
% End:

The stretch and shrink causes issues in code listings.

This impacts LaTeX now that Unicode engines
use the Latin Modern fonts in opentype format by
default with it.

LaTeX test file:

\documentclass{article}

\begin{document}
\ttfamily

\the\fontdimen2\font
\the\fontdimen3\font
\the\fontdimen4\font

\fontname\font

\showoutput
\thispagestyle{empty}
\end{document}
% Local variables:
% TeX-engine: xetex
% End:

xelatex: 5.25pt2.625pt1.75pt  "[lmmono10-regular]:"
lualatex:5.25pt0.0pt0.0pt     [lmmono10-regular]:

Best,

PS: as I don't currently subscribe to the list, could you please
CC my address if replying thanks.

Jean-François




More information about the XeTeX mailing list