summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-19 00:01:37 +0000
committerKarl Berry <karl@freefriends.org>2019-11-19 00:01:37 +0000
commit61708ee48576253b5b4bd021bcb68f8244cd0d18 (patch)
treebdbf7edbc7272752b1334c1350cb73e568259239 /Master/texmf-dist/tex/latex/microtype/microtype-luatex.def
parentf701004ed7cb0fbe527dbc0b50ad9dfc9f117a69 (diff)
microtype (19nov19)
git-svn-id: svn://tug.org/texlive/trunk@52853 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/microtype/microtype-luatex.def')
-rw-r--r--Master/texmf-dist/tex/latex/microtype/microtype-luatex.def20
1 files changed, 17 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def b/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def
index 08daa2166eb..5bdb98dc2bf 100644
--- a/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def
+++ b/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def
@@ -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@copy@font\relax
-\MT@requires@luatex4{\let\pdfcopyfont\copyfont}\relax
\def\MT@copy@font@{%
\xdef\MT@font@copy{\csname\MT@@font/\MT@pr@context/\MT@ex@context\endcsname}%
\expandafter\ifx\MT@font@copy\relax
@@ -123,7 +122,7 @@
\else
\MT@exp@two@c\let\font@name\MT@font@orig
\fi
- \global\MT@exp@two@c\pdfcopyfont\MT@font@copy\font@name
+ \MT@exp@two@c\MT@lua@copyfont\meaning\font@name\@nil
\MT@map@clist@c\MT@active@features{%
\MT@exp@cs\ifx{MT@\@nameuse{MT@abbr@##1}}\relax\else
\def\@tempa{##1}%
@@ -133,6 +132,7 @@
\fi
\MT@exp@two@c\let\MT@font\MT@font@copy
\let\font@name\MT@font@copy
+ \aftergroup\MT@exp@two@c
\aftergroup\let\aftergroup\font@name\aftergroup\MT@font@copy
}
\def\MT@rem@from@list#1{%
@@ -141,6 +141,8 @@
\MT@font \csname MT@\@tempa @#1font@list\endcsname
\fi
}
+\def\MT@lua@copyfont #1 #2 #3\@nil{%
+ \global\expandafter\font\MT@font@copy=#3\relax}
\def\MT@protrusion{\MT@maybe@do{pr}}
\def\MT@set@pr@codes{%
\MT@nofamilyfalse
@@ -303,10 +305,22 @@
\MT@nonselectedfalse
}
\let\MT@set@ex@codes\MT@set@ex@codes@n
+\directlua{\detokenize{
+ if font.setexpansion == nil then
+ tex.print("\\@firstoftwo")
+ else
+ tex.print("\\@secondoftwo")
+ end
+}}{
\MT@requires@luatex4{\let\pdffontexpand\expandglyphsinfont}\relax
\def\MT@expandfont{%
\pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax
}
+}{
+\def\MT@expandfont{%
+ \directlua{font.setexpansion(font.current(),\MT@stretch@,\MT@shrink@,\MT@step@)}%
+}
+}
\def\MT@set@all@ex#1{%
\MT@do@font{\efcode\MT@font\@tempcnta=#1\relax}%
}