From 52753a8dd9d71685f008587be6e89ab669a39b39 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 25 Aug 2017 17:53:45 +0200 Subject: [PATCH] Use fontspec 2.6d. This version contains the necessary changes, replacing our patched versions. Since it was added to TeXLive after the last release, we add the new file for convenience. --- doc/Makefile.am | 3 +- doc/fontspec-patched.sty | 58 ---------------------- ...ntspec-xetex-patched.sty => fontspec-xetex.sty} | 29 +++-------- doc/template.tex | 1 - 4 files changed, 8 insertions(+), 83 deletions(-) delete mode 100644 doc/fontspec-patched.sty rename doc/{fontspec-xetex-patched.sty => fontspec-xetex.sty} (99%) diff --git a/doc/Makefile.am b/doc/Makefile.am index 875b3cf..823fbb4 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -69,8 +69,7 @@ EXTRA_DIST = c2pandoc.sed \ template.html \ template.tex \ longtable-patched.sty \ - fontspec-patched.sty \ - fontspec-xetex-patched.sty \ + fontspec-xetex.sty \ ucharclasses-patched.sty \ ttfautohint-css.html \ ttfautohint-js.html diff --git a/doc/fontspec-patched.sty b/doc/fontspec-patched.sty deleted file mode 100644 index 6b4f9c2..0000000 --- a/doc/fontspec-patched.sty +++ /dev/null @@ -1,58 +0,0 @@ -%% This is file `fontspec-patched.sty'. -%% -%% It is the file `fontspec.sty' (from the `fontspec' package provided by -%% CTAN) with modifications to load `fontspec-xelatex-patched.sty'. -%% -%% This is a legal modification based on the LPPL license since the file -%% name has been changed. -%% -%% The original source code files can be found at -%% -%% http://ctan.org/pkg/fontspec -%% -%% For reference, here the original copyright notice. -%% -%% This is file `fontspec.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% fontspec.dtx (with options: `fontspec,load') -%% ------------------------------------------------ -%% The FONTSPEC package for XeLaTeX/LuaLaTeX -%% (C) 2004--2017 Will Robertson and Khaled Hosny -%% License information appended. -%% ------------------------------------------------ -\RequirePackage{expl3} -\RequirePackage{xparse} -\ProvidesExplPackage{fontspec-patched}% - {2017/08/07}{2.6c-patched}{Font selection for XeLaTeX and LuaLaTeX} - -% to make LaTeX believe the `fontspec' package gets loaded -\expandafter\def\csname ver@fontspec.sty\endcsname{2017/08/07} - -\sys_if_engine_luatex:T - { \RequirePackage{luaotfload} - \directlua{require("fontspec")} - \RequirePackageWithOptions{fontspec-luatex} \endinput } -\sys_if_engine_xetex:T - { \RequirePackageWithOptions{fontspec-xetex-patched} \endinput } -\msg_new:nnn {fontspec} {cannot-use-pdftex} - { - 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". - } -\msg_fatal:nn {fontspec} {cannot-use-pdftex} -%% ------------------------------------------------ -%% Copyright 2004--2017 Will Robertson -%% Copyright 2009--2013 Khaled Hosny -%% -%% Distributable under the LaTeX Project Public License, version 1.3c or higher. -%% The latest version of this license is at: http://www.latex-project.org/lppl.txt -%% -%% This work is "maintained" by Will Robertson. -%% It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex. -%% And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf. -%% ------------------------------------------------ -%% -%% End of file `fontspec-patched.sty'. diff --git a/doc/fontspec-xetex-patched.sty b/doc/fontspec-xetex.sty similarity index 99% rename from doc/fontspec-xetex-patched.sty rename to doc/fontspec-xetex.sty index feb0d3a..6ff78f0 100644 --- a/doc/fontspec-xetex-patched.sty +++ b/doc/fontspec-xetex.sty @@ -1,18 +1,3 @@ -%% This is file `fontspec-xetex-patched.sty'. -%% -%% It is the file `fontspec-xetex.sty' (from the `fontspec' package provided -%% by CTAN) with added support for new scripts to cover Unicode 10.0. -%% -%% This is a legal modification based on the LPPL license since the file -%% name has been changed. -%% -%% The original source code files can be found at -%% -%% http://ctan.org/pkg/fontspec -%% -%% For reference, here the original copyright notice. -%% -%% This is file `fontspec.sty', %% %% This is file `fontspec-xetex.sty', %% generated with the docstrip utility. @@ -46,12 +31,8 @@ %% ------------------------------------------------ \RequirePackage{expl3} \RequirePackage{xparse} -\ProvidesExplPackage{fontspec-xetex-patched}% - {2018/08/07}{2.6c-patched}{Font selection for XeLaTeX and LuaLaTeX} - -% to make LaTeX believe the `fontspec-xetex' package gets loaded -\expandafter\def\csname ver@fontspec-xetex.sty\endcsname{2017/08/07} - +\ProvidesExplPackage{fontspec-xetex}% + {2017/08/14}{2.6d}{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 @@ -2338,21 +2319,25 @@ } \__fontspec_keys_define_code:nnn {fontspec} {HyphenChar} { + \__fontspec_warning:nx {only-xetex-feature} {HyphenChar} \str_if_eq:nnTF {#1} {None} { \tl_put_right:Nn \l__fontspec_postadjust_tl { \hyphenchar \font = -1 \relax } } { + \tl_if_single:nTF {#1} { \tl_set:Nn \l_fontspec_hyphenchar_tl {`#1} } { \tl_set:Nn \l_fontspec_hyphenchar_tl { #1} } + \__fontspec_primitive_font_glyph_if_exist:NnTF \l_fontspec_font {\l_fontspec_hyphenchar_tl} { \tl_put_right:Nn \l__fontspec_postadjust_tl { \hyphenchar \font = \l_fontspec_hyphenchar_tl \scan_stop: } } { \__fontspec_error:nx {no-glyph}{#1} } + } } \__fontspec_aff_error:n {HyphenChar} @@ -4031,4 +4016,4 @@ %% And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf. %% ------------------------------------------------ %% -%% End of file `fontspec-xetex-patched.sty'. +%% End of file `fontspec-xetex.sty'. diff --git a/doc/template.tex b/doc/template.tex index 07ead95..2cb706f 100644 --- a/doc/template.tex +++ b/doc/template.tex @@ -10,7 +10,6 @@ \usepackage{ifxetex,ifluatex} \usepackage[T1]{fontenc} \usepackage{fixltx2e} -\usepackage{fontspec-patched} \usepackage{libertine} \ifxetex -- 2.11.4.GIT