texlive[52853] Master/texmf-dist: microtype (19nov19)

commits+karl at tug.org commits+karl at tug.org
Tue Nov 19 01:01:37 CET 2019


Revision: 52853
          http://tug.org/svn/texlive?view=revision&revision=52853
Author:   karl
Date:     2019-11-19 01:01:37 +0100 (Tue, 19 Nov 2019)
Log Message:
-----------
microtype (19nov19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/microtype/README.md
    trunk/Master/texmf-dist/doc/latex/microtype/microtype.pdf
    trunk/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx
    trunk/Master/texmf-dist/source/latex/microtype/microtype.dtx
    trunk/Master/texmf-dist/tex/latex/microtype/letterspace.sty
    trunk/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def
    trunk/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def
    trunk/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def
    trunk/Master/texmf-dist/tex/latex/microtype/microtype.cfg
    trunk/Master/texmf-dist/tex/latex/microtype/microtype.lua
    trunk/Master/texmf-dist/tex/latex/microtype/microtype.sty

Modified: trunk/Master/texmf-dist/doc/latex/microtype/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/microtype/README.md	2019-11-19 00:01:08 UTC (rev 52852)
+++ trunk/Master/texmf-dist/doc/latex/microtype/README.md	2019-11-19 00:01:37 UTC (rev 52853)
@@ -4,7 +4,7 @@
 
 **Subliminal refinements towards typographical perfection**
 
-  (v2.7c -- 2019/10/10)
+  (v2.7d -- 2019/11/18)
 
 
 Overview

Modified: trunk/Master/texmf-dist/doc/latex/microtype/microtype.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx	2019-11-19 00:01:08 UTC (rev 52852)
+++ trunk/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx	2019-11-19 00:01:37 UTC (rev 52853)
@@ -1,7 +1,7 @@
 %\iffalse meta-comment
 % !Mode:: "TeX:DTX:UK"
 % !smartQuote:: "English"
-% !DTXversion:: "2.7c"
+% !DTXversion:: "2.7d"
 % ------------------------------------------------------------------------
 %                       The `microtype' package
 %         Subliminal refinements towards typographical perfection
@@ -26,7 +26,7 @@
 %
 \ProvidesFile
 %<*driver>
-    {\jobname.dtx}[2019/10/10 v2.7c]
+    {\jobname.dtx}[2019/11/18 v2.7d]
 %</driver>
 %<CharisSIL>  {mt-CharisSIL.cfg}[2017/07/07 v1.1 microtype config. file: Charis SIL (RS)]
 %<LatinModernRoman>  {mt-LatinModernRoman.cfg}[2013/03/13 v1.0 microtype config. file: Latin Modern Roman (RS)]
@@ -36,14 +36,6 @@
 \usepackage{fontspec}
 \usepackage{luatexbase}
 \RequireLuaModule{luainputenc}
-\ifnum\luatexversion>84
-  \protected\edef\pdfminorversion  {\pdfvariable minorversion}
-  \protected\def\pdfobj            {\pdfextension obj }
-  \protected\def\pdfcatalog        {\pdfextension catalog }
-  \protected\def\pdfmapline        {\pdfextension mapline }
-  \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
-  \protected\def\pdflastobj        {\numexpr\pdffeedback lastobj\relax}
-\fi
 \makeatletter
 % microtype-doc.sty is 8-bit, and the following is a hack
 \luatexbase at directlua{luatexbase.add_to_callback('process_input_buffer', luainputenc.fake_utf_read, 'luainputenc.fake_utf_read')}

Modified: trunk/Master/texmf-dist/source/latex/microtype/microtype.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/microtype/microtype.dtx	2019-11-19 00:01:08 UTC (rev 52852)
+++ trunk/Master/texmf-dist/source/latex/microtype/microtype.dtx	2019-11-19 00:01:37 UTC (rev 52853)
@@ -1,7 +1,7 @@
 %\iffalse meta-comment
 % !Mode:: "TeX:DTX:UK"
 % !smartQuote:: "English"
-% !DTXversion:: "2.7c"
+% !DTXversion:: "2.7d"
 % ------------------------------------------------------------------------
 %                       The `microtype' package
 %         Subliminal refinements towards typographical perfection
@@ -37,7 +37,7 @@
 %<luatex-def>  {microtype-luatex.def}
 %<xetex-def>  {microtype-xetex.def}
 %<*package|letterspace|m-t|pdftex-def|luatex-def|xetex-def>
-  [2019/10/10 v2.7c
+  [2019/11/18 v2.7d
 %<package>   Micro-typographical refinements
 %<letterspace>   Robust letterspacing
 %<m-t>   microtype main configuration file
@@ -51,8 +51,8 @@
 %<luafile>local microtype  = microtype
 %<luafile>microtype.module = {
 %<luafile>    name         = "microtype",
-%<luafile>    version      = "2.7c",
-%<luafile>    date         = "2019/10/10",
+%<luafile>    version      = "2.7d",
+%<luafile>    date         = "2019/11/18",
 %<luafile>    description  = "microtype module.",
 %<luafile>    author       = "E. Roux, R. Schlicht and P. Gesang",
 %<luafile>    copyright    = "E. Roux, R. Schlicht and P. Gesang",
@@ -84,8 +84,8 @@
 %</driver>
 % Let's abolish CM! We use Charter and Letter Gothic
 % (for the pre-built documentation on CTAN):
- \usepackage[T1]{fontenc}
- \usepackage[charter]{mathdesign}
+\usepackage[T1]{fontenc}
+\usepackage[charter]{mathdesign}
  \def\rmdefault{bch} % not scaled
  \def\sfdefault{SourceSansPro-TLF}
  \def\SourceSansPro at scale{1.02}
@@ -92,8 +92,8 @@
  \def\ttdefault{blg}
  {\ttfamily\selectfont
   \DeclareFontShape{T1}{blg}{k}{n}{<-> ssub * blg/b/n}{}}
- \usepackage{textcomp}
-\usepackage{ifpdf,ifluatex,ifxetex}
+\usepackage{textcomp}
+\usepackage{iftex}
 %<*!docsty>
 \ifxetex\else
 \usepackage[latin1]{\ifluatex lua\fi inputenc}
@@ -120,10 +120,10 @@
       { encoding = T1,
         family   = blg }
       { _ = {100,100} } % underscores shouldn't touch
- \ifxetex\else
+\ifxetex\else
  % disable ?` and !` ligatures (sample in section \ref{sec:disable-ligatures})
  \DisableLigatures[?,!]{encoding = *, family = rm* }
- \fi
+\fi
  % Fraktur sample in section \ref{sec:lettersp}
  \IfFileExists{t1mwr.fd}
    {\def\textfrak##1{{\fontfamily{mwr}\selectfont ##1}}
@@ -136,15 +136,18 @@
         \SetTracking[no ligatures={f,s,c}]{encoding=LY,family=yfrak}{120}
       \fi}
      {\def\textfrak{\rule{.5em}{1.5ex}\@gobble}}}
+\ifpdftex\else
+  \microtypesetup{kerning=false}
+\fi
 \tolerance=700
 \ifpdf
   \ifluatex % microtype.dtx finally compiles with 0.35!
-    \microtypesetup{kerning=false}
     \def\pdftexversion{200} % in TeX Live 2015, they let this to \luatexversion
     \let\pdfxform                    \saveboxresource
     \let\pdflastxform                \lastsavedboxresourceindex
     \protected\edef\pdfminorversion  {\pdfvariable minorversion}
     \protected\def\pdfobj            {\pdfextension obj }
+    \protected\def\pdfcatalog        {\pdfextension catalog }
     \protected\def\pdfannot          {\pdfextension annot }
     \protected\def\pdfoutline        {\pdfextension outline }
     \protected\def\pdfmapline        {\pdfextension mapline }
@@ -161,11 +164,10 @@
   \InputIfFileExists{microtype-logo.dtx}\relax\relax
   \InputIfFileExists{microtype-lssample.dtx}\relax\relax
 \else
-  \let\lsstyle\relax
+  \ifluatex\else
+    \let\lsstyle\relax
+  \fi
 \fi
-\ifxetex
-  \microtypesetup{kerning=false}
-\fi
 \usepackage{booktabs}
 \usepackage{array}
  \newcolumntype{L}[1]{p{#1}<{\raggedright}}
@@ -333,7 +335,7 @@
      \itemindent \labelsep
      \lstset{belowskip=0pt}}}
   {\endlist}
-% boxes (for some reason, mathdesign changes these values) % still?
+% boxes (for some reason, mathdesign changes these values)
 \setlength\fboxrule{0.4pt}
 \setlength\fboxsep{3pt}
 \setlength\arrayrulewidth{0.4pt}
@@ -1216,7 +1218,7 @@
 %\Describe{Option}{DVIoutput}{true,*false}
 % \pdftex\ and \luatex\ are not only able to generate <PDF> output but can also
 % spit out <DVI> files.\footnote{
-%    Recent \TeX\ systems are using \pdftex\ as the default engine even for
+%    All recent \TeX\ systems are using \pdftex\ as the default engine also for
 %    <DVI> output.}
 % The latter can be ordered with the option \opt{DVIoutput}, which will set
 % \cmd\pdfoutput\ to zero.
@@ -2054,7 +2056,6 @@
 %       of the respective space dimension set by the font. By default, the unit
 %       is measured by the space dimensions. For example, with the following
 %       (nonsensical) settings:
-%\pagebreak ^^A layout
 %\begin{verbatim}
 %\SetExtraSpacing
 %   [ unit = space  ] % default
@@ -2651,6 +2652,7 @@
 % distributions, this can be changed in the file \file{updmap.cfg} by setting
 % |pdftexDownloadBase14| to |true|.
 %
+%\pagebreak ^^A layout
 %\changes{v1.9a}{2005/11/15}{add explanation for error message with non-Type\,1 fonts}
 %  \item
 %\begin{verbatim}
@@ -2866,9 +2868,13 @@
 %  \contributor Franz Wexler      <@\at @>,  ^^A https://tex.stackexchange.com/users/182307/franz-wexler
 %  \contributor Moritz Wemheuer   <moritz.wemheuer\at gmail.com>,
 % `\contributor Andy N            <@\at @>', ^^A https://tex.stackexchange.com/users/182462/andy-n
-%  \contributor Phelype Oleinik   <phe.h.o1\at gmail.com>
+%  \contributor Phelype Oleinik   <phe.h.o1\at gmail.com>,
+%  \contributor Falk Hanisch      <falk.hanisch\at tu-dresden.de>,
+%  \contributor Markus Kohm       <komascript\at gmx.info>,
+%  \contributor Paolo Polesana    <@\at @>, ^^A https://tex.stackexchange.com/users/95083/paolo-polesana
+%  \contributor Oliver Kopp       <koppdev\at gmail.com>
 % and
-%  \contributor Falk Hanisch      <falk.hanisch\at tu-dresden.de>.
+%  \contributor Hironori Kitagawa <h_kitagawa2001\at yahoo.co.jp>.
 %
 %
 %\iffalse
@@ -2960,13 +2966,13 @@
 % \bibitem[\pkg{fontspec}]{fontspec}
 %   Will Robertson,
 %    \emph{The \pkg{fontspec} package: Font selection for \xe\LaTeX\ and Lua\LaTeX},
-%    \newblock 15~March 2019.
+%    \newblock 19~October 2019.
 %    \newblock (\ctanpkgurl{fontspec})
 %
 % \bibitem[\pkg{luaotfload}]{luaotfload}
-%   \'Elie Roux, Khaled Hosny, Philipp Gesang, Ulrike Fischer,
+%   \'Elie Roux, Khaled Hosny, Philipp Gesang, Ulrike Fischer, Marcel Kr\"uger,
 %    \emph{The \pkg{luaotfload} package},
-%    \newblock 13~September 2019.
+%    \newblock 10~November 2019.
 %    \newblock (\ctanpkgurl{luaotfload})
 %
 % \bibitem[\pkg{pdfcprot}]{pdfcprot}
@@ -3019,6 +3025,8 @@
 %
 %\VersionDate{\expandafter\@gobble\fileversion}{\filedate}
 %
+%\VersionDate{2.7c}{2019/10/10}
+%
 %\VersionDate{2.7b}{2019/02/28}
 %
 %\VersionDate{2.7a}{2018/01/14}
@@ -3371,7 +3379,7 @@
 %  \RequirePackage,\@@enc at update,\cf at encoding,\f at encoding}
 %^^A\DoNotIndex{\add at accent,\curr at fontshape,\define at newfont,\do at subst@correction,
 %^^A  \every at math@size,\f at size,\font at name,\glb at currsize,\glb at settings,\normalfont,
-%^^A  \pickup at font,\selectfont,\set at fontsize,\showhyphens}                   ^^A latex
+%^^A  \pickup at font,\remove at tlig,\selectfont,\set at fontsize,\showhyphens}      ^^A latex
 %\DoNotIndex{\normalpdfoutput,\normalpdftexversion,\normalpdftexrevision}    ^^A tex live 2004
 %\DoNotIndex{\foreign at language,\languagename,\select at language,\shorthandoff} ^^A babel
 %\DoNotIndex{\percentsign}                                                   ^^A babel/spanish,galician,mexican
@@ -3967,6 +3975,8 @@
 %\todo{interface for \cmd\protrusionboundary}
 %\end{enum}
 %\changes{v2.6}{2016/04/22}{update for \luatex\ 0.85 (renamed primitives)}
+% Also, sometime between 1.0.4 and 1.0.7, the function |font.setexpansion|
+% has been introduced, but we'll test this directly later.
 %    \begin{macrocode}
 %<*luatex-def>
 %<debug>\MT at dinfo@nl0{this is luatex (\the\luatexversion)}
@@ -5630,7 +5640,6 @@
 %    \begin{macrocode}
 %<*pdftex-def|luatex-def>
 \let\MT at copy@font\relax
-%<luatex-def>\MT at requires@luatex4{\let\pdfcopyfont\copyfont}\relax
 %<pdftex-def>\MT at requires@pdftex7{
 \def\MT at copy@font@{%
 %    \end{macrocode}
@@ -5654,10 +5663,22 @@
     \else
       \MT at exp@two at c\let\font at name\MT at font@orig
     \fi
-    \global\MT at exp@two at c\pdfcopyfont\MT at font@copy\font at name
+%<pdftex-def>    \global\MT at exp@two at c\pdfcopyfont\MT at font@copy\font at name
+%    \end{macrocode}
+%\end{macro}
+% Even though \luatex\ also provides the primitive from \pdftex\ (even renamed to
+% \cmd\copyfont, that is, `promoted' as per the \luatex\ manual), it is crippled
+% in that OpenType features will be lost. ^^A see https://mailman.ntg.nl/pipermail/ntg-context/2016/087541.html
+%\changes{v2.7d}{2019/11/17}{in \luatex, don't use the \cmd\copyfont\ primitive, but load the font anew
+%                            (reported by \contributor Paolo Polesana <@\at @> and
+%                                         \contributor Oliver Kopp <koppdev\at gmail.com>)}
+%                                          ^^A http://tex.stackexchange.com/questions/338942/cancellation-of-color-fontspec-font-settings-while-defining-microtype-context
+%                                          ^^A https://tex.stackexchange.com/questions/419288/microtypecontext-with-lualatex
+% Therefore, we do not copy the font but load it anew.
+%    \begin{macrocode}
+%<luatex-def>    \MT at exp@two at c\MT at lua@copyfont\meaning\font at name\@nil
 %<debug>\MT at dinfo1{creating new copy: \MT at font@copy}%
 %    \end{macrocode}
-%\end{macro}
 % Since it's a new font, we have to remove it from the context lists.
 %    \begin{macrocode}
     \MT at map@clist at c\MT at active@features{%
@@ -5674,7 +5695,9 @@
   \let\font at name\MT at font@copy
 %    \end{macrocode}
 % But we have to properly substitute the font after we're done.
+% In \luatex, for some reason, one expansion step more.
 %    \begin{macrocode}
+%<luatex-def>  \aftergroup\MT at exp@two at c
   \aftergroup\let\aftergroup\font at name\aftergroup\MT at font@copy
 }
 %    \end{macrocode}
@@ -5689,6 +5712,14 @@
   \fi
 }
 %<pdftex-def>}\relax
+%    \end{macrocode}
+%\end{macro}
+%\begin{macro}{\MT at lua@copy at font}
+% \meta{\#1} and \meta{\#2} are `|select|' and `|font|', respectively,
+% \meta{\#3} is the font spec.
+%    \begin{macrocode}
+%<luatex-def>\def\MT at lua@copyfont #1 #2 #3\@nil{%
+%<luatex-def>  \global\expandafter\font\MT at font@copy=#3\relax}
 %</pdftex-def|luatex-def>
 %    \end{macrocode}
 %\end{macro}
@@ -6660,11 +6691,29 @@
 %\end{macro}
 %\begin{macro}{\MT at expandfont}
 % Expand the font.
+% In \luatex, we try to go the |lua| way, if the |font.setexpansion| function exists.
+%\changes{v2.7d}{2019/11/17}{use \luatex\ function \texttt{font.}\penalty\exhyphenpenalty\texttt{setexpansion} if available}
 %    \begin{macrocode}
-%<luatex-def>\MT at requires@luatex4{\let\pdffontexpand\expandglyphsinfont}\relax
+%<*luatex-def>
+\directlua{\detokenize{
+  if font.setexpansion == nil then
+    tex.print("\\@firstoftwo")
+  else
+    tex.print("\\@secondoftwo")
+  end
+}}{
+\MT at requires@luatex4{\let\pdffontexpand\expandglyphsinfont}\relax
+%</luatex-def>
 \def\MT at expandfont{%
   \pdffontexpand\MT at font \MT at stretch@ \MT at shrink@ \MT at step@ \MT at auto@\relax
 }
+%<*luatex-def>
+}{
+\def\MT at expandfont{%
+  \directlua{font.setexpansion(font.current(),\MT at stretch@,\MT at shrink@,\MT at step@)}%
+}
+}
+%</luatex-def>
 %    \end{macrocode}
 %\end{macro}
 %\begin{macro}{\MT at set@all at ex}
@@ -9457,7 +9506,7 @@
 %\end{macro}
 %\begin{macro}{\MT at register@subst at font}
 % Register the substituted font
-%\changes{v2.5}{2010/08/23}{only register if it isn't registered already
+%\changes{v2.5}{2010/08/23}{only register substituted font if it isn't registered already
 %                           (reported by \contributor George Gratzer <gratzer\at me.com>
 %                            and \contributor Josep Maria Font <jmfont\at ub.edu>)}
 %                             ^^A 1. <http://permalink.gmane.org/gmane.comp.tex.macosx/38293>
@@ -9464,9 +9513,20 @@
 %                             ^^A 2. <http://permalink.gmane.org/gmane.comp.tex.macosx/38303>
 %                             ^^A (beta:02)
 % (only if it isn't registered already).
+%\changes{v2.7d}{2019/10/28}{remove substitute font from list
+%                            (reported by \contributor Markus Kohm <komascript\at gmx.info>)}
+%                             ^^A private mail, 2019/01/16
+%                             ^^A https://tex.stackexchange.com/q/470311
+% Additionally, we have to remove the substitute font from the list of fonts,
+% so that we set it up again.
 %    \begin{macrocode}
-\def\MT at register@subst at font{\MT at exp@one at n\MT at in@clist\font at name\MT at font@list
-  \ifMT at inlist@\else\xdef\MT at font@list{\MT at font@list\font at name,}\fi}
+\def\MT at register@subst at font{%
+  \MT at exp@one at n\MT at in@clist\font at name\MT at font@list
+  \ifMT at inlist@\else
+    \xdef\MT at font@list{\MT at font@list\font at name,}%
+    \expandafter\MT at rem@from at clist\MT at font\MT at font@list
+  \fi
+}
 %    \end{macrocode}
 %\end{macro}
 %
@@ -9503,9 +9563,10 @@
 %    \end{macrocode}
 %\end{macro}
 %\begin{macro}{\MT at register@subst at font@cx}
-% Add the substituted font to each feature list.
+% Add the substituted font to each feature list and possibly remove substitute font.
 %\todo{remove from other lists?}
 %\changes{v2.5}{2010/08/23}{only register if it isn't registered already} ^^A (beta:02)
+%\changes{v2.7d}{2019/10/28}{remove substitute font from lists}
 %    \begin{macrocode}
 \def\MT at register@subst at font@cx{%
   \MT at map@clist at c\MT at active@features{%
@@ -9515,6 +9576,8 @@
       \MT at exp@cs\MT at xadd
         {MT@##1@\csname MT@##1 at context\endcsname font at list}%
         {\font at name,}%
+      \expandafter\MT at exp@one at n\expandafter\MT at rem@from at clist\expandafter\MT at font
+         \csname MT@##1@\csname MT@##1 at context\endcsname font at list\endcsname
     \fi
   }%
 }
@@ -17071,7 +17134,7 @@
 %   Grave accent  \`     Left brace    \{     Vertical bar  \|
 %   Right brace   \}     Tilde         \~}
 %
-% \CheckSum{10630}
+% \CheckSum{10666}
 %
 % \Finale
 %

Modified: trunk/Master/texmf-dist/tex/latex/microtype/letterspace.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/microtype/letterspace.sty	2019-11-19 00:01:08 UTC (rev 52852)
+++ trunk/Master/texmf-dist/tex/latex/microtype/letterspace.sty	2019-11-19 00:01:37 UTC (rev 52853)
@@ -33,7 +33,7 @@
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage
   {letterspace}
-  [2019/10/10 v2.7c
+  [2019/11/18 v2.7d
    Robust letterspacing
    (RS)]
 \def\MT at MT

Modified: trunk/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def	2019-11-19 00:01:08 UTC (rev 52852)
+++ trunk/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def	2019-11-19 00:01:37 UTC (rev 52853)
@@ -30,7 +30,7 @@
 %%
 \ProvidesFile
   {microtype-luatex.def}
-  [2019/10/10 v2.7c
+  [2019/11/18 v2.7d
    Definitions specific to
    luatex
    (RS)]
@@ -113,7 +113,6 @@
   \fi
 }
 \let\MT at copy@font\relax
-\MT at requires@luatex4{\let\pdfcopyfont\copyfont}\relax
 \def\MT at copy@font@{%
   \xdef\MT at font@copy{\csname\MT@@font/\MT at pr@context/\MT at ex@context\endcsname}%
   \expandafter\ifx\MT at font@copy\relax
@@ -123,7 +122,7 @@
     \else
       \MT at exp@two at c\let\font at name\MT at font@orig
     \fi
-    \global\MT at exp@two at c\pdfcopyfont\MT at font@copy\font at name
+    \MT at exp@two at c\MT at lua@copyfont\meaning\font at name\@nil
     \MT at map@clist at c\MT at active@features{%
       \MT at exp@cs\ifx{MT@\@nameuse{MT at abbr@##1}}\relax\else
         \def\@tempa{##1}%
@@ -133,6 +132,7 @@
   \fi
   \MT at exp@two at c\let\MT at font\MT at font@copy
   \let\font at name\MT at font@copy
+  \aftergroup\MT at exp@two at c
   \aftergroup\let\aftergroup\font at name\aftergroup\MT at font@copy
 }
 \def\MT at rem@from at list#1{%
@@ -141,6 +141,8 @@
        \MT at font \csname MT@\@tempa @#1font at list\endcsname
   \fi
 }
+\def\MT at lua@copyfont #1 #2 #3\@nil{%
+  \global\expandafter\font\MT at font@copy=#3\relax}
 \def\MT at protrusion{\MT at maybe@do{pr}}
 \def\MT at set@pr at codes{%
   \MT at nofamilyfalse
@@ -303,10 +305,22 @@
   \MT at nonselectedfalse
 }
 \let\MT at set@ex at codes\MT at set@ex at codes@n
+\directlua{\detokenize{
+  if font.setexpansion == nil then
+    tex.print("\\@firstoftwo")
+  else
+    tex.print("\\@secondoftwo")
+  end
+}}{
 \MT at requires@luatex4{\let\pdffontexpand\expandglyphsinfont}\relax
 \def\MT at expandfont{%
   \pdffontexpand\MT at font \MT at stretch@ \MT at shrink@ \MT at step@ \MT at auto@\relax
 }
+}{
+\def\MT at expandfont{%
+  \directlua{font.setexpansion(font.current(),\MT at stretch@,\MT at shrink@,\MT at step@)}%
+}
+}
 \def\MT at set@all at ex#1{%
   \MT at do@font{\efcode\MT at font\@tempcnta=#1\relax}%
 }

Modified: trunk/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def	2019-11-19 00:01:08 UTC (rev 52852)
+++ trunk/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def	2019-11-19 00:01:37 UTC (rev 52853)
@@ -30,7 +30,7 @@
 %%
 \ProvidesFile
   {microtype-pdftex.def}
-  [2019/10/10 v2.7c
+  [2019/11/18 v2.7d
    Definitions specific to
    pdftex
    (RS)]

Modified: trunk/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def	2019-11-19 00:01:08 UTC (rev 52852)
+++ trunk/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def	2019-11-19 00:01:37 UTC (rev 52853)
@@ -30,7 +30,7 @@
 %%
 \ProvidesFile
   {microtype-xetex.def}
-  [2019/10/10 v2.7c
+  [2019/11/18 v2.7d
    Definitions specific to
    xetex
    (RS)]

Modified: trunk/Master/texmf-dist/tex/latex/microtype/microtype.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/microtype/microtype.cfg	2019-11-19 00:01:08 UTC (rev 52852)
+++ trunk/Master/texmf-dist/tex/latex/microtype/microtype.cfg	2019-11-19 00:01:37 UTC (rev 52853)
@@ -40,7 +40,7 @@
 %%
 \ProvidesFile
   {microtype.cfg}
-  [2019/10/10 v2.7c
+  [2019/11/18 v2.7d
    microtype main configuration file
    (RS)]
 

Modified: trunk/Master/texmf-dist/tex/latex/microtype/microtype.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/microtype/microtype.lua	2019-11-19 00:01:08 UTC (rev 52852)
+++ trunk/Master/texmf-dist/tex/latex/microtype/microtype.lua	2019-11-19 00:01:37 UTC (rev 52853)
@@ -34,8 +34,8 @@
 local microtype  = microtype
 microtype.module = {
     name         = "microtype",
-    version      = "2.7c",
-    date         = "2019/10/10",
+    version      = "2.7d",
+    date         = "2019/11/18",
     description  = "microtype module.",
     author       = "E. Roux, R. Schlicht and P. Gesang",
     copyright    = "E. Roux, R. Schlicht and P. Gesang",

Modified: trunk/Master/texmf-dist/tex/latex/microtype/microtype.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/microtype/microtype.sty	2019-11-19 00:01:08 UTC (rev 52852)
+++ trunk/Master/texmf-dist/tex/latex/microtype/microtype.sty	2019-11-19 00:01:37 UTC (rev 52853)
@@ -29,7 +29,7 @@
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage
   {microtype}
-  [2019/10/10 v2.7c
+  [2019/11/18 v2.7d
    Micro-typographical refinements
    (RS)]
 \def\MT at MT
@@ -1289,8 +1289,13 @@
 }
 \def\MT at check@font{\MT at exp@one at n\MT at in@clist\MT at font\MT at font@list}
 \def\MT at register@font{\xdef\MT at font@list{\MT at font@list\MT at font,}}
-\def\MT at register@subst at font{\MT at exp@one at n\MT at in@clist\font at name\MT at font@list
-  \ifMT at inlist@\else\xdef\MT at font@list{\MT at font@list\font at name,}\fi}
+\def\MT at register@subst at font{%
+  \MT at exp@one at n\MT at in@clist\font at name\MT at font@list
+  \ifMT at inlist@\else
+    \xdef\MT at font@list{\MT at font@list\font at name,}%
+    \expandafter\MT at rem@from at clist\MT at font\MT at font@list
+  \fi
+}
 \let\MT at active@features\@empty
 \def\MT at check@font at cx{%
   \MT at if@true
@@ -1313,6 +1318,8 @@
       \MT at exp@cs\MT at xadd
         {MT@##1@\csname MT@##1 at context\endcsname font at list}%
         {\font at name,}%
+      \expandafter\MT at exp@one at n\expandafter\MT at rem@from at clist\expandafter\MT at font
+         \csname MT@##1@\csname MT@##1 at context\endcsname font at list\endcsname
     \fi
   }%
 }



More information about the tex-live-commits mailing list