summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx')
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx27
1 files changed, 9 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
index f3f537c5ebd..74787a51ef9 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
@@ -9,8 +9,8 @@ fontspec = fontspec or {}
local fontspec = fontspec
fontspec.module = {
name = "fontspec",
- version = "2.5",
- date = "2016/01/30",
+ version = "2.5a",
+ date = "2016/02/01",
description = "Advanced font selection for LuaLaTeX.",
author = "Khaled Hosny, Philipp Gesang, Will Robertson",
copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",
@@ -26,14 +26,6 @@ fontspec.warning = warn or (function (s) luatexbase.module_warning("fontspec", s
fontspec.error = err or (function (s) luatexbase.module_error("fontspec", s) end)
% \end{macrocode}
%
-% The following lines check for existence of a certain script, language or
-% feature in a given font.
-% \begin{macrocode}
-local check_script = luaotfload.aux.provides_script
-local check_language = luaotfload.aux.provides_language
-local check_feature = luaotfload.aux.provides_feature
-% \end{macrocode}
-%
% The following are the function that get called from \TeX\ end.
% \begin{macrocode}
local function tempswatrue() tex.sprint([[\FontspecSetCheckBoolTrue ]]) end
@@ -42,7 +34,7 @@ local function tempswafalse() tex.sprint([[\FontspecSetCheckBoolFalse]]) end
%
% \begin{macrocode}
function fontspec.check_ot_script(fnt, script)
- if check_script(font.id(fnt), script) then
+ if luaotfload.aux.provides_script(font.id(fnt), script) then
tempswatrue()
else
tempswafalse()
@@ -52,7 +44,7 @@ end
%
% \begin{macrocode}
function fontspec.check_ot_lang(fnt, lang, script)
- if check_language(font.id(fnt), script, lang) then
+ if luaotfload.aux.provides_language(font.id(fnt), script, lang) then
tempswatrue()
else
tempswafalse()
@@ -68,7 +60,7 @@ function fontspec.check_ot_feat(fnt, feat, lang, script)
return
end
end
- if check_feature(font.id(fnt), script, lang, feat) then
+ if luaotfload.aux.provides_feature(font.id(fnt), script, lang, feat) then
tempswatrue()
else
tempswafalse()
@@ -77,14 +69,13 @@ end
% \end{macrocode}
%
% \begin{macrocode}
-local get_math_dimension = luaotfload.aux.get_math_dimension
function fontspec.mathfontdimen(fnt, str)
- local mathdimens = get_math_dimension(fnt, str)
+ local mathdimens = luaotfload.aux.get_math_dimension(fnt, str)
if mathdimens then
- fontspec.sprint(mathdimens)
- fontspec.sprint("sp")
+ tex.sprint(mathdimens)
+ tex.sprint("sp")
else
- fontspec.sprint("0pt")
+ tex.sprint("0pt")
end
end
% \end{macrocode}