summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-02-01 23:06:16 +0000
committerKarl Berry <karl@freefriends.org>2016-02-01 23:06:16 +0000
commit61ebb8b69624b4931744ae78792435da9cfdf4c9 (patch)
tree1ac78806e589a4e2e2c0e326b2b5a642b1f1d0f0 /Master/texmf-dist/tex/latex/fontspec/fontspec.lua
parent56ded4aa6c33b2ea2dedafe929e2069ed9f6d008 (diff)
fontspec (2feb16)
git-svn-id: svn://tug.org/texlive/trunk@39541 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fontspec/fontspec.lua')
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua22
1 files changed, 9 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
index ec0b8a171e2..0d3b3c170ce 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
@@ -14,8 +14,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,20 +26,17 @@ local err, warn, info, log = luatexbase.provides_module(fontspec.module)
fontspec.log = log or (function (s) luatexbase.module_info("fontspec", s) end)
fontspec.warning = warn or (function (s) luatexbase.module_warning("fontspec", s) end)
fontspec.error = err or (function (s) luatexbase.module_error("fontspec", s) end)
-local check_script = luaotfload.aux.provides_script
-local check_language = luaotfload.aux.provides_language
-local check_feature = luaotfload.aux.provides_feature
local function tempswatrue() tex.sprint([[\FontspecSetCheckBoolTrue ]]) end
local function tempswafalse() tex.sprint([[\FontspecSetCheckBoolFalse]]) end
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()
end
end
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()
@@ -52,20 +49,19 @@ 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()
end
end
-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
-- ------------------------------------------------