summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-21 23:05:09 +0000
committerKarl Berry <karl@freefriends.org>2013-05-21 23:05:09 +0000
commit3bc62343398c79b4222c8e853f58bf28def508df (patch)
tree400a2807c937ee9c0e8f2d3356bb1848e41dba80 /Master/texmf-dist
parentd543e9db99b507da1878899c0efc4586ed6edb14 (diff)
fontspec (21may13)
git-svn-id: svn://tug.org/texlive/trunk@30618 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/README5
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec-testsuite.pdfbin271681 -> 271559 bytes
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec.pdfbin1348784 -> 2798445 bytes
-rw-r--r--Master/texmf-dist/source/latex/fontspec/Makefile4
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.dtx191
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty20
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty2
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty16
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua137
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.sty4
10 files changed, 51 insertions, 328 deletions
diff --git a/Master/texmf-dist/doc/latex/fontspec/README b/Master/texmf-dist/doc/latex/fontspec/README
index 8091d0b8ef2..0610e92c6c3 100644
--- a/Master/texmf-dist/doc/latex/fontspec/README
+++ b/Master/texmf-dist/doc/latex/fontspec/README
@@ -72,6 +72,11 @@ Features may be added to the font currently in use with
Change history
--------------
+- v2.3c (2013/05/20)
+
+ * Compatbility with luaotfload 2013/05/20 2.2c, support for older version
+ removed.
+
- v2.3b (2013/05/12)
* Compatibility with new (and future) version of luaotfload
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec-testsuite.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec-testsuite.pdf
index b487aa2a993..d57ce9e952c 100644
--- a/Master/texmf-dist/doc/latex/fontspec/fontspec-testsuite.pdf
+++ b/Master/texmf-dist/doc/latex/fontspec/fontspec-testsuite.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
index 668dbe6d1e5..a4ded4d26e9 100644
--- a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
+++ b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/fontspec/Makefile b/Master/texmf-dist/source/latex/fontspec/Makefile
index e1c8eb5dbf7..2a0b321947e 100644
--- a/Master/texmf-dist/source/latex/fontspec/Makefile
+++ b/Master/texmf-dist/source/latex/fontspec/Makefile
@@ -73,8 +73,8 @@ CTAN_ZIP = $(NAME).zip
TDS_ZIP = $(NAME).tds.zip
ZIPS = $(CTAN_ZIP) $(TDS_ZIP)
-DO_PDFLATEX = lualatex --interaction=nonstopmode $< $(REDIRECT)
-DO_PDFLATEX_WRITE18 = lualatex --shell-escape --interaction=nonstopmode $< $(REDIRECT)
+DO_PDFLATEX = pdflatex --interaction=nonstopmode $< $(REDIRECT)
+DO_PDFLATEX_WRITE18 = pdflatex --shell-escape --interaction=nonstopmode $< $(REDIRECT)
DO_TEX = tex --interaction=nonstopmode $< $(REDIRECT)
DO_MAKEINDEX = makeindex -s gind.ist $(subst .dtx,,$<) $(REDIRECT) 2>&1
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
index 4682334a469..039cb13729f 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
@@ -66,7 +66,7 @@ This work consists of this file fontspec.dtx
%<fontspec&luatex>\ProvidesPackage{fontspec-luatex}
%<patches>\ProvidesPackage{fontspec-patches}
%<*fontspec|patches>
- [2013/05/12 v2.3b Font selection for XeLaTeX and LuaLaTeX]
+ [2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX]
%</fontspec|patches>
%
%<*driver>
@@ -2645,7 +2645,7 @@ This work consists of this file fontspec.dtx
{
\luatex_if_engine:TF
{
- \RequirePackage{luaotfload}[2011/10/06]
+ \RequirePackage{luaotfload}[2013/05/20]
\RequireLuaModule{fontspec}
}
{
@@ -4569,9 +4569,7 @@ This work consists of this file fontspec.dtx
{
\bool_set_false:N \l_fontspec_icu_bool
\bool_set_true:N \l_fontspec_firsttime_bool
- \cs_set:Npn \fontspec_namewrap:n ##1
-%<xetexx> { ##1 }
-%<luatex> { name:##1 }
+ \cs_set:Npn \fontspec_namewrap:n ##1 { ##1 }
\tl_clear:N \l_fontspec_optical_size_tl
\tl_clear:N \l_fontspec_renderer_tl
\tl_clear:N \l_fontspec_defined_shapes_tl
@@ -4699,8 +4697,7 @@ This work consists of this file fontspec.dtx
\fontspec_check_ot_feat:nTF {#1}
{
\fontspec_update_fontid:n {#1=#2}
-%<xetexx> \fontspec_update_featstr:n { #1 = #2 }
-%<luatex> \fontspec_update_featstr:n { #1 = \int_eval:n {#2+1} }
+ \fontspec_update_featstr:n { #1 = #2 }
}
{ \fontspec_warning:nx {icu-feature-not-exist-in-font} {#1} }
}
@@ -4986,9 +4983,7 @@ This work consists of this file fontspec.dtx
\bool_set_true:N \l_fontspec_nobf_bool
\bool_set_true:N \l_fontspec_noit_bool
\bool_set_true:N \l_fontspec_external_bool
- \cs_gset:Npn \fontspec_namewrap:n ##1
-%<xetexx> { [ #1 ##1 ] }
-%<luatex> { file: #1 ##1 }
+ \cs_gset:Npn \fontspec_namewrap:n ##1 { [ #1 ##1 ] }
%<*xetexx>
\keys_set:nn {fontspec-renderer} {Renderer=ICU}
%</xetexx>
@@ -5835,9 +5830,7 @@ This work consists of this file fontspec.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\cs_set:Nn \fontspec_salt:n
-%<xetexx> { +salt = #1 }
-%<luatex> { +salt = \int_eval:n {#1+1} }
+\cs_set:Nn \fontspec_salt:n { +salt = #1 }
% \end{macrocode}
%
% \begin{macrocode}
@@ -5887,14 +5880,12 @@ This work consists of this file fontspec.dtx
{
ScriptStyle .code:n =
{
-%<xetexx> \fontspec_update_fontid:n {+ssty=0}
-%<luatex> \fontspec_update_fontid:n {+ssty=1}
+ \fontspec_update_fontid:n {+ssty=0}
\fontspec_update_featstr:n{+sstyle}
},
ScriptScriptStyle .code:n =
{
-%<xetexx> \fontspec_update_fontid:n {+ssty=1}
-%<luatex> \fontspec_update_fontid:n {+ssty=2}
+ \fontspec_update_fontid:n {+ssty=1}
\fontspec_update_featstr:n{+ssstyle}
}
}
@@ -5967,9 +5958,7 @@ This work consists of this file fontspec.dtx
Annotation .default:n = {0} ,
Annotation / unknown .code:n =
{
- \fontspec_make_feature:nnx {}{}
-%<xetexx> { +nalt=#1 }
-%<luatex> { +nalt= \int_eval:n {#1+1} }
+ \fontspec_make_feature:nnx {}{}{ +nalt=#1 }
}
}
% \end{macrocode}
@@ -6640,8 +6629,8 @@ fontspec = fontspec or {}
local fontspec = fontspec
fontspec.module = {
name = "fontspec",
- version = 2.4,
- date = "2013/05/12",
+ version = "2.3c",
+ date = "2013/05/20",
description = "Advanced font selection for LuaLaTeX.",
author = "Khaled Hosny, Philipp Gesang",
copyright = "Khaled Hosny, Philipp Gesang",
@@ -6661,93 +6650,18 @@ function fontspec.sprint (...)
tex.sprint(luatexbase.catcodetables['latex-package'], ...)
end
% \end{macrocode}
+%
% The following lines check for existence of a certain script, language or
% feature in a given font.
%
-% |luaotfload| provides basic functions for this, starting with version
-% 2.2. We use them if they are available, otherwise we still provide the code
-% for backward-compatibility with old versions of |luaotfload|.
-%
-% The first thing is to test for the presence of these functions.
-% \begin{macrocode}
-local luaotfload_aux
-if luaotfload and luaotfload.aux and luaotfload.aux.slot_of_name then
- luaotfload_aux = true
-else
- luaotfload_aux = false
-end
-
-local check_script, check_language, check_feature, ids
-
-if luaotfload_aux then
- check_script = luaotfload.aux.provides_script
- check_language = luaotfload.aux.provides_language
- check_feature = luaotfload.aux.provides_feature
-else
-% \end{macrocode}
-% This else will be removed in the next version.
-% \begin{macrocode}
- ids = fonts.identifiers or fonts.ids or fonts.hashes.identifiers -- first two are for backward compatibility
- function check_script(id, script)
- local s = string.lower(script)
- if id and id > 0 then
- local otfdata = ids[id].shared.rawdata
- if otfdata then
- local features = otfdata.resources.features
- for i,_ in pairs(features) do
- for j,_ in pairs(features[i]) do
- if features[i][j][s] then
- fontspec.log("script '%s' exists in font '%s'",
- script, ids[id].fullname)
- return true
- end
- end
- end
- end
- end
- end
- function check_language(id, script, language)
- local s = string.lower(script)
- local l = string.lower(language)
- if id and id > 0 then
- local otfdata = ids[id].shared.rawdata
- if otfdata then
- local features = otfdata.resources.features
- for i,_ in pairs(features) do
- for j,_ in pairs(features[i]) do
- if features[i][j][s] and features[i][j][s][l] then
- fontspec.log("language '%s' for script '%s' exists in font '%s'",
- language, script, ids[id].fullname)
- return true
- end
- end
- end
- end
- end
- end
- function check_feature(id, script, language, feature)
- local s = string.lower(script)
- local l = string.lower(language)
- local f = string.lower(feature:gsub("^[+-]", ""):gsub("=.*$", ""))
- if id and id > 0 then
- local otfdata = ids[id].shared.rawdata
- if otfdata then
- local features = otfdata.resources.features
- for i,_ in pairs(features) do
- if features[i][f] and features[i][f][s] then
- if features[i][f][s][l] == true then
- fontspec.log("feature '%s' for language '%s' and script '%s' exists in font '%s'",
- feature, language, script, ids[id].fullname)
- return true
- end
- end
- end
- end
- end
- end
-end
+% \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() fontspec.sprint([[\@tempswatrue]]) end
local function tempswafalse() fontspec.sprint([[\@tempswafalse]]) end
@@ -6790,19 +6704,7 @@ end
% \end{macrocode}
%
% \begin{macrocode}
-local get_math_dimension
-if luaotfload_aux then
- get_math_dimension = luaotfload.aux.get_math_dimension
-else
- get_math_dimension = function(fnt, str)
- local mathdimens = ids[font.id(fnt)].MathConstants
- if mathdimens then
- return mathdimens[str]
- else
- return nil
- end
- end
-end
+local get_math_dimension = luaotfload.aux.get_math_dimension
function fontspec.mathfontdimen(fnt, str)
local mathdimens = get_math_dimension(fnt, str)
if mathdimens then
@@ -6814,55 +6716,6 @@ function fontspec.mathfontdimen(fnt, str)
end
% \end{macrocode}
%
-% |luaotfload| takes care of setting |\fontdimen8| starting from version 2.2,
-% the following code is just for backward compatibility with old version.
-%
-% \begin{macrocode}
-if not luaotfload_aux then
- local function set_capheight(fontdata)
- local capheight
- local shared = fontdata.shared
- if shared then
- local metadata
- local units_per_em
- local os2_capheight
- local size = fontdata.size or fontdata.parameters.size
-
- if shared.rawdata then --- new otfl
- metadata = shared.rawdata.metadata
- units_per_em = shared.rawdata.metadata.units_per_em
- os2_capheight = metadata.pfminfo.os2_capheight
- else --- legacy
- metadata = shared.otfdata.metadata
- units_per_em = fontdata.units_per_em or fontdata.units
- or fontdata.parameters.units
- os2_capheight = shared.otfdata.pfminfo.os2_capheight
- end
-
- if os2_capheight > 0 then
- capheight = os2_capheight / units_per_em * size
- else
- local X8 = string.byte"X"
- if fontdata.characters[X8] then
- capheight = fontdata.characters[X8].height
- else
- capheight = metadata.ascent / units_per_em * size
- end
- end
- else
- local X8 = string.byte"X"
- if fontdata.characters[X8] then
- capheight = fontdata.characters[X8].height
- end
- end
- if capheight then
- fontdata.parameters[8] = capheight
- end
- end
- luatexbase.add_to_callback("luaotfload.patch_font", set_capheight, "fontspec.set_capheight")
-end
-% \end{macrocode}
-%
% \begin{macrocode}
%</lua>
% \end{macrocode}
@@ -7248,7 +7101,6 @@ If you want to run just a single test, use
% \begin{macrocode}
\ProvidesPackage{fontspec-style}
-\usepackage{fontspec}
\usepackage{booktabs,calc,caption,color,enumitem,fancyvrb,hologo,graphicx,ifthen,url,varioref,varwidth,microtype,tocloft}
% ToC formatting:
@@ -7265,9 +7117,8 @@ If you want to run just a single test, use
\newcommand\XeLaTeX{\hologo{XeLaTeX}}
\newcommand\LuaTeX{\hologo{LuaTeX}}
\newcommand\LuaLaTeX{\hologo{LuaLaTeX}}
-\setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
-\setsansfont[Scale=MatchLowercase,Ligatures=TeX]{Iwona}
-\setmonofont[Scale=MatchLowercase]{Inconsolata}
+\usepackage{tgpagella,eulervm}
+\usepackage{inconsolata}
\usepackage[
bookmarks=true,
colorlinks=true,
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
index 8fba89c97e5..4758f213f0c 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
@@ -14,7 +14,7 @@
%%
%%
\ProvidesPackage{fontspec-luatex}
- [2013/05/12 v2.3b Font selection for XeLaTeX and LuaLaTeX]
+ [2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX]
\ExplSyntaxOn
@@ -903,8 +903,7 @@
{
\bool_set_false:N \l_fontspec_icu_bool
\bool_set_true:N \l_fontspec_firsttime_bool
- \cs_set:Npn \fontspec_namewrap:n ##1
- { name:##1 }
+ \cs_set:Npn \fontspec_namewrap:n ##1 { ##1 }
\tl_clear:N \l_fontspec_optical_size_tl
\tl_clear:N \l_fontspec_renderer_tl
\tl_clear:N \l_fontspec_defined_shapes_tl
@@ -964,7 +963,7 @@
\fontspec_check_ot_feat:nTF {#1}
{
\fontspec_update_fontid:n {#1=#2}
- \fontspec_update_featstr:n { #1 = \int_eval:n {#2+1} }
+ \fontspec_update_featstr:n { #1 = #2 }
}
{ \fontspec_warning:nx {icu-feature-not-exist-in-font} {#1} }
}
@@ -1078,8 +1077,7 @@
\bool_set_true:N \l_fontspec_nobf_bool
\bool_set_true:N \l_fontspec_noit_bool
\bool_set_true:N \l_fontspec_external_bool
- \cs_gset:Npn \fontspec_namewrap:n ##1
- { file: #1 ##1 }
+ \cs_gset:Npn \fontspec_namewrap:n ##1 { [ #1 ##1 ] }
}
\aliasfontfeature{ExternalLocation}{Path}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Extension}
@@ -1603,8 +1601,7 @@
{ \fontspec_make_feature:nnx {17}{##1} { \fontspec_salt:n {##1} } }
}
}
-\cs_set:Nn \fontspec_salt:n
- { +salt = \int_eval:n {#1+1} }
+\cs_set:Nn \fontspec_salt:n { +salt = #1 }
\fontspec_define_font_feature:n {Variant}
\keys_define:nn {fontspec}
{
@@ -1641,12 +1638,12 @@
{
ScriptStyle .code:n =
{
- \fontspec_update_fontid:n {+ssty=1}
+ \fontspec_update_fontid:n {+ssty=0}
\fontspec_update_featstr:n{+sstyle}
},
ScriptScriptStyle .code:n =
{
- \fontspec_update_fontid:n {+ssty=2}
+ \fontspec_update_fontid:n {+ssty=1}
\fontspec_update_featstr:n{+ssstyle}
}
}
@@ -1699,8 +1696,7 @@
Annotation .default:n = {0} ,
Annotation / unknown .code:n =
{
- \fontspec_make_feature:nnx {}{}
- { +nalt= \int_eval:n {#1+1} }
+ \fontspec_make_feature:nnx {}{}{ +nalt=#1 }
}
}
\keys_define:nn {fontspec}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
index 49c24813be7..98b152f2117 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
@@ -14,7 +14,7 @@
%%
%%
\ProvidesPackage{fontspec-patches}
- [2013/05/12 v2.3b Font selection for XeLaTeX and LuaLaTeX]
+ [2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX]
\RequirePackage{fixltx2e}[2006/03/24]
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
index ea1d1d2a609..c392b552f6c 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
@@ -14,7 +14,7 @@
%%
%%
\ProvidesPackage{fontspec-xetex}
- [2013/05/12 v2.3b Font selection for XeLaTeX and LuaLaTeX]
+ [2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX]
\ExplSyntaxOn
@@ -924,8 +924,7 @@
{
\bool_set_false:N \l_fontspec_icu_bool
\bool_set_true:N \l_fontspec_firsttime_bool
- \cs_set:Npn \fontspec_namewrap:n ##1
- { ##1 }
+ \cs_set:Npn \fontspec_namewrap:n ##1 { ##1 }
\tl_clear:N \l_fontspec_optical_size_tl
\tl_clear:N \l_fontspec_renderer_tl
\tl_clear:N \l_fontspec_defined_shapes_tl
@@ -995,7 +994,7 @@
\fontspec_check_ot_feat:nTF {#1}
{
\fontspec_update_fontid:n {#1=#2}
- \fontspec_update_featstr:n { #1 = #2 }
+ \fontspec_update_featstr:n { #1 = #2 }
}
{ \fontspec_warning:nx {icu-feature-not-exist-in-font} {#1} }
}
@@ -1143,8 +1142,7 @@
\bool_set_true:N \l_fontspec_nobf_bool
\bool_set_true:N \l_fontspec_noit_bool
\bool_set_true:N \l_fontspec_external_bool
- \cs_gset:Npn \fontspec_namewrap:n ##1
- { [ #1 ##1 ] }
+ \cs_gset:Npn \fontspec_namewrap:n ##1 { [ #1 ##1 ] }
\keys_set:nn {fontspec-renderer} {Renderer=ICU}
}
\aliasfontfeature{ExternalLocation}{Path}
@@ -1682,8 +1680,7 @@
{ \fontspec_make_feature:nnx {17}{##1} { \fontspec_salt:n {##1} } }
}
}
-\cs_set:Nn \fontspec_salt:n
- { +salt = #1 }
+\cs_set:Nn \fontspec_salt:n { +salt = #1 }
\fontspec_define_font_feature:n {Variant}
\keys_define:nn {fontspec}
{
@@ -1778,8 +1775,7 @@
Annotation .default:n = {0} ,
Annotation / unknown .code:n =
{
- \fontspec_make_feature:nnx {}{}
- { +nalt=#1 }
+ \fontspec_make_feature:nnx {}{}{ +nalt=#1 }
}
}
\keys_define:nn {fontspec}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
index 9bbb1c78260..94a9479d4e7 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
@@ -19,8 +19,8 @@ fontspec = fontspec or {}
local fontspec = fontspec
fontspec.module = {
name = "fontspec",
- version = 2.4,
- date = "2013/05/12",
+ version = "2.3c",
+ date = "2013/05/20",
description = "Advanced font selection for LuaLaTeX.",
author = "Khaled Hosny, Philipp Gesang",
copyright = "Khaled Hosny, Philipp Gesang",
@@ -36,79 +36,9 @@ fontspec.error = err
function fontspec.sprint (...)
tex.sprint(luatexbase.catcodetables['latex-package'], ...)
end
-local luaotfload_aux
-if luaotfload and luaotfload.aux and luaotfload.aux.slot_of_name then
- luaotfload_aux = true
-else
- luaotfload_aux = false
-end
-
-local check_script, check_language, check_feature, ids
-
-if luaotfload_aux then
- check_script = luaotfload.aux.provides_script
- check_language = luaotfload.aux.provides_language
- check_feature = luaotfload.aux.provides_feature
-else
- ids = fonts.identifiers or fonts.ids or fonts.hashes.identifiers -- first two are for backward compatibility
- function check_script(id, script)
- local s = string.lower(script)
- if id and id > 0 then
- local otfdata = ids[id].shared.rawdata
- if otfdata then
- local features = otfdata.resources.features
- for i,_ in pairs(features) do
- for j,_ in pairs(features[i]) do
- if features[i][j][s] then
- fontspec.log("script '%s' exists in font '%s'",
- script, ids[id].fullname)
- return true
- end
- end
- end
- end
- end
- end
- function check_language(id, script, language)
- local s = string.lower(script)
- local l = string.lower(language)
- if id and id > 0 then
- local otfdata = ids[id].shared.rawdata
- if otfdata then
- local features = otfdata.resources.features
- for i,_ in pairs(features) do
- for j,_ in pairs(features[i]) do
- if features[i][j][s] and features[i][j][s][l] then
- fontspec.log("language '%s' for script '%s' exists in font '%s'",
- language, script, ids[id].fullname)
- return true
- end
- end
- end
- end
- end
- end
- function check_feature(id, script, language, feature)
- local s = string.lower(script)
- local l = string.lower(language)
- local f = string.lower(feature:gsub("^[+-]", ""):gsub("=.*$", ""))
- if id and id > 0 then
- local otfdata = ids[id].shared.rawdata
- if otfdata then
- local features = otfdata.resources.features
- for i,_ in pairs(features) do
- if features[i][f] and features[i][f][s] then
- if features[i][f][s][l] == true then
- fontspec.log("feature '%s' for language '%s' and script '%s' exists in font '%s'",
- feature, language, script, ids[id].fullname)
- return true
- end
- end
- end
- end
- end
- end
-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() fontspec.sprint([[\@tempswatrue]]) end
local function tempswafalse() fontspec.sprint([[\@tempswafalse]]) end
function fontspec.check_ot_script(fnt, script)
@@ -138,19 +68,7 @@ function fontspec.check_ot_feat(fnt, feat, lang, script)
tempswafalse()
end
end
-local get_math_dimension
-if luaotfload_aux then
- get_math_dimension = luaotfload.aux.get_math_dimension
-else
- get_math_dimension = function(fnt, str)
- local mathdimens = ids[font.id(fnt)].MathConstants
- if mathdimens then
- return mathdimens[str]
- else
- return nil
- end
- end
-end
+local get_math_dimension = luaotfload.aux.get_math_dimension
function fontspec.mathfontdimen(fnt, str)
local mathdimens = get_math_dimension(fnt, str)
if mathdimens then
@@ -160,49 +78,6 @@ function fontspec.mathfontdimen(fnt, str)
fontspec.sprint("0pt")
end
end
-if not luaotfload_aux then
- local function set_capheight(fontdata)
- local capheight
- local shared = fontdata.shared
- if shared then
- local metadata
- local units_per_em
- local os2_capheight
- local size = fontdata.size or fontdata.parameters.size
-
- if shared.rawdata then --- new otfl
- metadata = shared.rawdata.metadata
- units_per_em = shared.rawdata.metadata.units_per_em
- os2_capheight = metadata.pfminfo.os2_capheight
- else --- legacy
- metadata = shared.otfdata.metadata
- units_per_em = fontdata.units_per_em or fontdata.units
- or fontdata.parameters.units
- os2_capheight = shared.otfdata.pfminfo.os2_capheight
- end
-
- if os2_capheight > 0 then
- capheight = os2_capheight / units_per_em * size
- else
- local X8 = string.byte"X"
- if fontdata.characters[X8] then
- capheight = fontdata.characters[X8].height
- else
- capheight = metadata.ascent / units_per_em * size
- end
- end
- else
- local X8 = string.byte"X"
- if fontdata.characters[X8] then
- capheight = fontdata.characters[X8].height
- end
- end
- if capheight then
- fontdata.parameters[8] = capheight
- end
- end
- luatexbase.add_to_callback("luaotfload.patch_font", set_capheight, "fontspec.set_capheight")
-end
--
-- Copyright 2004--2013 Will Robertson <wspr81@gmail.com>
-- Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
index 88392e43ba9..e8a7d357965 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
@@ -14,7 +14,7 @@
%%
%%
\ProvidesPackage{fontspec}
- [2013/05/12 v2.3b Font selection for XeLaTeX and LuaLaTeX]
+ [2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX]
\RequirePackage{expl3}[2011/09/05]
@@ -32,7 +32,7 @@
{
\luatex_if_engine:TF
{
- \RequirePackage{luaotfload}[2011/10/06]
+ \RequirePackage{luaotfload}[2013/05/20]
\RequireLuaModule{fontspec}
}
{