summaryrefslogtreecommitdiff
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
parent56ded4aa6c33b2ea2dedafe929e2069ed9f6d008 (diff)
fontspec (2feb16)
git-svn-id: svn://tug.org/texlive/trunk@39541 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/README.md90
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec.pdfbin808509 -> 808189 bytes
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx27
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.dtx25
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty4
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty2
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.cfg21
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua22
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.sty22
10 files changed, 89 insertions, 126 deletions
diff --git a/Master/texmf-dist/doc/latex/fontspec/README.md b/Master/texmf-dist/doc/latex/fontspec/README.md
index 636f48ffe7e..6715e5c64ba 100644
--- a/Master/texmf-dist/doc/latex/fontspec/README.md
+++ b/Master/texmf-dist/doc/latex/fontspec/README.md
@@ -1,6 +1,5 @@
-
-THE FONTSPEC PACKAGE
-====================
+THE FONTSPEC PACKAGE v2.5a
+==========================
The fontspec package provides an automatic and unified interface for loading
fonts in LaTeX. XeTeX and LuaTeX (the latter through the `luaotfload` package)
@@ -24,12 +23,13 @@ Please offer suggestions and file bug reports in the issue tracker:
<http://github.com/wspr/fontspec/issues>
-Requirements
-------------
+Table of Contents
+-----------------
-The `fontspec` package requires an up-to-date TeX Live or MiKTeX installation,
-including the most recent version of the `l3kernel` package which provides
-the LaTeX3 programming interface known as `expl3`.
+* Summary of user commands
+* Change history ("what's new?")
+* Installation instructions
+* License details
Summary of user commands
@@ -67,6 +67,14 @@ Features may be added to the font currently in use with
Change history
--------------
+- v2.5a (2016/02/01) "bugs fixed"
+
+ * Rather embarrassing bug fix! (`unicode-math` was broken.)
+ * Remember to add the `fontspec.cfg` file to the distribution.
+ * Remove `+trep` from `Ligatures=TeX` (no longer necessary).
+ * Add some basic tests using `l3build`; more to come.
+ * Simplify some internal Lua code and package loading code.
+
- v2.5 (2016/01/30) "TL2016 release"
* Provide a new Unicode font encoding ("TU") to replace EU1/EU2 and xunicode. If this causes problems, load fontspec with the `[euenc]` option to revert to the old behaviour.
@@ -313,22 +321,15 @@ Change history
Installation
------------
-If you are running TeX Live 2010, you can get the latest version
-of this package by running
+If you are running TeX Live, you can get the latest version of this package by running
tlmgr install fontspec
- * * *
-
-If you wish to download the latest release version from CTAN, get
-the pre-built TDS package and extract it into your local texmf tree:
+If you wish to download the latest release version from CTAN, get the pre-built TDS package and extract it into your local texmf tree:
http://mirror.ctan.org/install/macros/latex/contrib/fontspec.tds.zip
- * * *
-
-If you wish to use the latest development version from Github,
-either use git to obtain the bleeding edge version with
+If you wish to use the latest development version from Github, either use git to obtain the bleeding edge version with
git clone git://github.com/wspr/fontspec.git
@@ -336,69 +337,28 @@ or if you don't have git you can download it from
http://github.com/wspr/fontspec/zipball/master
-Having obtained the package from Github, run
+Having obtained the package from Github, extract the package code by running
tex fontspec.dtx
-to extract the source then and move the necessary files into your
-local texmf tree. The documentation can be compiled by running
+and then move the necessary files into your local texmf tree.
+The documentation can be compiled by running
- pdflatex fontspec.dtx
+ xelatex -shell-escape fontspec.dtx
These steps are automated in the Makefile; run
- make install
+ texlua build.lua install
to compile the documentation and install all necessary files in your
local texmf tree. Depending how your TeX distribution is configured
you may then need to update the filename database with `texhash`.
-Test suite
-----------
-
-Towards the end of the development process of version 2, we started
-to add a test suite to ensure stability with any future changes. The
-output of each test is included in the distributed documentation file
-`fontspec-testsuite.pdf`.
-
-There aren't many tests yet, but we'll slowly add to them in time.
-If you would like to help put some tests together, contributions are
-gladly accepted!
-
-
-Manifest
---------
-
-Source files:
- fontspec.dtx single file source & doc for the package
- Makefile script for extracting and installing
-
-Derived files:
- fontspec.pdf documentation
- fontspec.sty LaTeX style file
- fontspec.lua Lua functions for LuaTeX
- fontspec-patches.sty redefinitions of various LaTeX internals
- fontspec.cfg default configuration file
- fontspec-xetex.tex example file for XeTeX
- fontspec-luatex.tex example file for LuaTeX
- fontspec-testsuite.tex test suite documentation file
-
-Test suite: (within testsuite/)
- testsuite.cls class file for each test
- testsuite-listing.tex listing of each test in the suite
- L*.ltx LuaLaTeX test file
- X*.ltx XeLaTeX test file
- F*.ltx Test file for both engines
-
-Documentation sources:
- doc/*.pdf These are pre-generated example outputs for
- direct inclusion in the documentation
-
License
-------
-Copyright 2004--2010 Will Robertson <wspr81@gmail.com>
+Copyright 2004--2016 Will Robertson <wspr81@gmail.com>
Copyright 2009--2010 Khaled Hosny <khaledhosny@eglug.org>
Distributable under the LaTeX Project Public License,
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
index 3f259e38307..0213413cc5b 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/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}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
index dcdc34485e9..da5b9ac1558 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
@@ -24,7 +24,7 @@
\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-luatex}%
- {2016/01/30}{2.5}{Font selection for XeLaTeX and LuaLaTeX}
+ {2016/02/01}{2.5a}{Font selection for XeLaTeX and LuaLaTeX}
\bool_new:N \l__fontspec_firsttime_bool
\bool_new:N \l__fontspec_nobf_bool
\bool_new:N \l__fontspec_noit_bool
@@ -1951,7 +1951,7 @@
{
Ligatures / TeX .code:n =
{
- \__fontspec_update_featstr:n { +tlig; +trep }
+ \__fontspec_update_featstr:n { +tlig }
}
}
\__fontspec_define_font_feature:n{Letters}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
index e116c14c8bc..272a2f4257c 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
@@ -24,7 +24,7 @@
\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-xetex}%
- {2016/01/30}{2.5}{Font selection for XeLaTeX and LuaLaTeX}
+ {2016/02/01}{2.5a}{Font selection for XeLaTeX and LuaLaTeX}
\bool_new:N \l__fontspec_firsttime_bool
\bool_new:N \l__fontspec_nobf_bool
\bool_new:N \l__fontspec_noit_bool
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg b/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg
new file mode 100644
index 00000000000..3301e3eb594
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg
@@ -0,0 +1,21 @@
+
+%%% FONTSPEC.CFG %%%
+%
+% This configuration file sets up TeX Ligatures by default for all fonts loaded
+% with `\setmainfont` and `\setsansfont`.
+%
+% In addition, `\setmonofont` has default features to enforce "monospace"
+% settings with regard to space stretchability and shrinkability.
+%
+% Make a copy of this file in your own home TEXMF directory to set up your own
+% defaults.
+
+
+\defaultfontfeatures
+ [\rmfamily,\sffamily]
+ {Ligatures=TeX}
+
+\defaultfontfeatures
+ [\ttfamily]
+ {WordSpace={1,0,0},
+ PunctuationSpace=WordSpace}
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
-- ------------------------------------------------
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
index afa682999de..c50a7097202 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
@@ -13,23 +13,19 @@
\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec}%
- {2016/01/30}{2.5}{Font selection for XeLaTeX and LuaLaTeX}
+ {2016/02/01}{2.5a}{Font selection for XeLaTeX and LuaLaTeX}
+\sys_if_engine_luatex:T
+ { \RequirePackage{luaotfload}
+ \directlua{require("fontspec")}
+ \RequirePackageWithOptions{fontspec-luatex} \endinput }
+\sys_if_engine_xetex:T
+ { \RequirePackageWithOptions{fontspec-xetex} \endinput }
\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}
%% ------------------------------------------------
%% Copyright 2004--2016 Will Robertson <wspr81@gmail.com>
%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>