diff options
author | Karl Berry <karl@freefriends.org> | 2016-02-01 23:06:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-02-01 23:06:16 +0000 |
commit | 61ebb8b69624b4931744ae78792435da9cfdf4c9 (patch) | |
tree | 1ac78806e589a4e2e2c0e326b2b5a642b1f1d0f0 /Master/texmf-dist/source/latex/fontspec | |
parent | 56ded4aa6c33b2ea2dedafe929e2069ed9f6d008 (diff) |
fontspec (2feb16)
git-svn-id: svn://tug.org/texlive/trunk@39541 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec')
3 files changed, 22 insertions, 32 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx index 7037f7b9b6d..b68d73b169e 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx @@ -858,7 +858,7 @@ \@@_update_featstr:n { mapping = tex-text } %</xetexx> %<*luatex> - \@@_update_featstr:n { +tlig; +trep } + \@@_update_featstr:n { +tlig } %</luatex> } } 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} diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx index 45c1019930c..8f2e1d796eb 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx @@ -78,7 +78,7 @@ And the derived files: fontspec*.sty,fontspec.lua, and fontspec.pdf. %<fontspec&xetexx>\ProvidesExplPackage{fontspec-xetex}% %<fontspec&luatex>\ProvidesExplPackage{fontspec-luatex}% %<*fontspec> - {2016/01/30}{2.5}{Font selection for XeLaTeX and LuaLaTeX} + {2016/02/01}{2.5a}{Font selection for XeLaTeX and LuaLaTeX} %</fontspec> % %<*driver> @@ -115,22 +115,21 @@ And the derived files: fontspec*.sty,fontspec.lua, and fontspec.pdf. % For Lua\TeX, load \pkg{luaotfload}. % \begin{macrocode} %<*load> +\sys_if_engine_luatex:T + { \RequirePackage{luaotfload} + \directlua{require("fontspec")} + \RequirePackageWithOptions{fontspec-luatex} \endinput } +\sys_if_engine_xetex:T + { \RequirePackageWithOptions{fontspec-xetex} \endinput } +% \end{macrocode} +% If not one of the above, error: +% \begin{macrocode} \msg_new:nnn {fontspec} {cannot-use-pdftex} { - The~ fontspec~ package~ requires~ either~ XeTeX~ or~ LuaTeX~ to~ function.\\\\ + The~ fontspec~ package~ requires~ either~ XeTeX~ or~ LuaTeX.\\\\ You~ must~ change~ your~ typesetting~ engine~ to,~ e.g.,~ "xelatex"~ or~ "lualatex" instead~ of~ plain~ "latex"~ or~ "pdflatex". } -\sys_if_engine_xetex:F - { - \sys_if_engine_luatex:F { \msg_fatal:nn {fontspec} {cannot-use-pdftex} } - } -\sys_if_engine_luatex:T - { - \RequirePackage{luaotfload}[2013/05/20] - \directlua{require("fontspec")} - } -\sys_if_engine_luatex:T { \RequirePackageWithOptions{fontspec-luatex} } -\sys_if_engine_xetex:T { \RequirePackageWithOptions{fontspec-xetex} } +\msg_fatal:nn {fontspec} {cannot-use-pdftex} \endinput %</load> % \end{macrocode} |