summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fontspec
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-01-30 23:00:25 +0000
committerKarl Berry <karl@freefriends.org>2016-01-30 23:00:25 +0000
commit0911ade404142a305ac949e3c53934a536168c3b (patch)
treea701776f43e3bddd09795208a8c3ed63ab5041cc /Master/texmf-dist/tex/latex/fontspec
parentb9447fda2f7279a83d10a110619ece7d753633b0 (diff)
fontspec (30jan16)
git-svn-id: svn://tug.org/texlive/trunk@39512 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fontspec')
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty865
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty181
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty871
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.cfg19
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua66
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.sty307
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/tuenc.def90
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/tufontrange-T1.def198
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/tufontrange-TS1.def134
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/tulmr.fd43
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/tulmss.fd36
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/tulmtt.fd68
12 files changed, 1925 insertions, 953 deletions
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
index 12154849c38..dcdc34485e9 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
@@ -5,25 +5,292 @@
%% The original source files were:
%%
%% fontspec.dtx (with options: `fontspec,luatex')
-%%
-%% _________________________________________
-%% The fontspec package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2015 Will Robertson and Khaled Hosny
-%%
-%% License information appended.
-%%
-%%
-\ProvidesPackage{fontspec-luatex}
- [2015/09/24 v2.4e Font selection for XeLaTeX and LuaLaTeX]
-
+%% fontspec-vars.dtx (with options: `vars')
+%% fontspec-msg.dtx (with options: `msg')
+%% fontspec-opening.dtx (with options: `fontspec,luatex')
+%% fontspec-fontload.dtx (with options: `fontspec,luatex')
+%% fontspec-user.dtx (with options: `fontspec,luatex')
+%% fontspec-api.dtx (with options: `fontspec,luatex')
+%% fontspec-internal.dtx (with options: `fontspec,luatex')
+%% fontspec-keyval.dtx (with options: `fontspec,luatex')
+%% fontspec-math.dtx (with options: `fontspec,luatex')
+%% fontspec-closing.dtx (with options: `fontspec,luatex')
+%% fontspec-patches.dtx (with options: `patches')
+%% ------------------------------------------------
+%% The FONTSPEC package for XeLaTeX/LuaLaTeX
+%% (C) 2004--2016 Will Robertson and Khaled Hosny
+%% License information appended.
+%% ------------------------------------------------
+\RequirePackage{expl3}
+\RequirePackage{xparse}
+\ProvidesExplPackage{fontspec-luatex}%
+ {2016/01/30}{2.5}{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
+\bool_new:N \l__fontspec_nosc_bool
+\bool_new:N \l__fontspec_check_bool
+\cs_new:Npn \FontspecSetCheckBoolTrue { \bool_set_true:N \l__fontspec_check_bool }
+\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l__fontspec_check_bool }
+\bool_new:N \l__fontspec_tfm_bool
+\bool_new:N \l__fontspec_atsui_bool
+\bool_new:N \l__fontspec_ot_bool
+\bool_new:N \l__fontspec_mm_bool
+\bool_new:N \l__fontspec_graphite_bool
+\bool_new:N \g__fontspec_math_euler_bool
+\bool_new:N \g__fontspec_math_lucida_bool
+\bool_new:N \g__fontspec_pkg_euler_loaded_bool
+\bool_new:N \g__fontspec_cfg_bool
+\bool_new:N \g__fontspec_math_bool
+\bool_new:N \g__fontspec_euenc_bool
+\int_new:N \l_fontspec_script_int
+\int_new:N \l_fontspec_language_int
+\int_new:N \l_fontspec_strnum_int
+\fp_new:N \l__fontspec_tmpa_fp
+\fp_new:N \l__fontspec_tmpb_fp
+\dim_new:N \l__fontspec_tmpa_dim
+\dim_new:N \l__fontspec_tmpb_dim
+\dim_new:N \l__fontspec_tmpc_dim
+\tl_set:Nx \c_colon_str { \tl_to_str:N : }
+\cs_set:Npn \use_v:nnnnn #1#2#3#4#5 {#5}
+\cs_set:Npn \use_iv:nnnnn #1#2#3#4#5 {#4}
+\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
+\cs_generate_variant:Nn \int_set:Nn {Nv}
+\cs_generate_variant:Nn \keys_set:nn {nx}
+\cs_generate_variant:Nn \keys_set_known:nnN {nx}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
+\cs_new:Nn \__fontspec_int_mult_truncate:Nn
+ {
+ \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
+ }
-\ExplSyntaxOn
-\tl_set:Nn \g_fontspec_encoding_tl {EU2}
+\cs_new:Npn \__fontspec_error:n { \msg_error:nn {fontspec} }
+\cs_new:Npn \__fontspec_error:nx { \msg_error:nnx {fontspec} }
+\cs_new:Npn \__fontspec_warning:n { \msg_warning:nn {fontspec} }
+\cs_new:Npn \__fontspec_warning:nx { \msg_warning:nnx {fontspec} }
+\cs_new:Npn \__fontspec_warning:nxx { \msg_warning:nnxx {fontspec} }
+\cs_new:Npn \__fontspec_info:n { \msg_info:nn {fontspec} }
+\cs_new:Npn \__fontspec_info:nx { \msg_info:nnx {fontspec} }
+\cs_new:Npn \__fontspec_info:nxx { \msg_info:nnxx {fontspec} }
+\cs_new:Npn \__fontspec_trace:n { \msg_trace:nn {fontspec} }
+\msg_new:nnn {fontspec} {no-size-info}
+ {
+ Size~ information~ must~ be~ supplied.\\
+ For~ example,~ SizeFeatures={Size={8-12},...}.
+ }
+\msg_new:nnnn {fontspec} {font-not-found}
+ {
+ The~ font~ "#1"~ cannot~ be~ found.
+ }
+ {
+ A~font~might~not~be~found~for~many~reasons.\\
+ Check~the~spelling,~where~the~font~is~installed~etc.~etc.\\\\
+ When~in~doubt,~ask~someone~for~help!
+ }
+\msg_new:nnnn {fontspec} {rename-feature-not-exist}
+ {
+ The~ feature~ #1~ doesn't~ appear~ to~ be~ defined.
+ }
+ {
+ It~ looks~ like~ you're~ trying~ to~ rename~ a~ feature~ that~ doesn't~ exist.
+ }
+\msg_new:nnn {fontspec} {no-glyph}
+ {
+ '\l_fontspec_fontname_tl'~ does~ not~ contain~ glyph~ #1.
+ }
+\msg_new:nnnn {fontspec} {euler-too-late}
+ {
+ The~ euler~ package~ must~ be~ loaded~ BEFORE~ fontspec.
+ }
+ {
+ fontspec~ only~ overwrites~ euler's~ attempt~ to~
+ define~ the~ maths~ text~ fonts~ if~ fontspec~ is~
+ loaded~ after~ euler.~ Type~ <return>~ to~ proceed~
+ with~ incorrect~ \string\mathit,~ \string\mathbf,~ etc.
+ }
+\msg_new:nnnn {fontspec} {no-xcolor}
+ {
+ Cannot~ load~ named~ colours~ without~ the~ xcolor~ package.
+ }
+ {
+ Sorry,~ I~ can't~ do~ anything~ to~ help.~ Instead~ of~ loading~
+ the~ color~ package,~ use~ xcolor~ instead.~ It's~ better.
+ }
+\msg_new:nnnn {fontspec} {unknown-color-model}
+ {
+ Error~ loading~ colour~ `#1';~ unknown~ colour~ model.
+ }
+ {
+ Sorry,~ I~ can't~ do~ anything~ to~ help.~ Please~ report~ this~ error~
+ to~ my~ developer~ with~ a~ minimal~ example~ that~ causes~ the~ problem.
+ }
+\msg_new:nnnn {fontspec} {not-in-addfontfeatures}
+ {
+ The~ "#1"~ font~ feature~ cannot~ be~ used~ in~ \string\addfontfeatures.
+ }
+ {
+ This~ is~ due~ to~ how~ TeX~ loads~ fonts;~ such~ settings~
+ are~ global~ so~ adding~ them~ mid-document~ within~ a~ group~ causes~
+ confusion.~ You'll~ need~ to~ define~ multiple~ font~ families~ to~ achieve~
+ what~ you~ want.
+ }
+\msg_new:nnn {fontspec} {addfontfeatures-ignored}
+ {
+ \string\addfontfeature (s)~ ignored~ \msg_line_context:;~
+ it~ cannot~ be~ used~ with~ a~ font~ that~ wasn't~ selected~ by~ a~ fontspec~ command.\\
+ \\
+ The~ current~ font~ is~ "\use:c{font@name}".\\
+ \int_compare:nTF { \clist_count:n {#1} = 1 }
+ { The~ requested~ feature~ is~ "#1". }
+ { The~ requested~ features~ are~ "#1". }
+ }
+\msg_new:nnn {fontspec} {feature-option-overwrite}
+ {
+ Option~ '#2'~ of~ font~ feature~ '#1'~ overwritten.
+ }
+\msg_new:nnn {fontspec} {script-not-exist-latn}
+ {
+ Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'.\\
+ 'Latin'~ script~ used~ instead.
+ }
+\msg_new:nnn {fontspec} {script-not-exist}
+ {
+ Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'.
+ }
+\msg_new:nnn {fontspec} {aat-feature-not-exist}
+ {
+ '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~
+ for~ AAT~ font~ '\l_fontspec_fontname_tl'.
+ }
+\msg_new:nnn {fontspec} {aat-feature-not-exist-in-font}
+ {
+ AAT~ feature~ '\l_keys_key_tl=\l_keys_value_tl'~ (#1)~ not~ available~
+ in~ font~ '\l_fontspec_fontname_tl'.
+ }
+\msg_new:nnn {fontspec} {icu-feature-not-exist}
+ {
+ '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~
+ for~ OpenType~ font~ '\l_fontspec_fontname_tl'
+ }
+\msg_new:nnn {fontspec} {icu-feature-not-exist-in-font}
+ {
+ OpenType~ feature~ '\l_keys_key_tl=\l_keys_value_tl'~ (#1)~ not~ available~
+ for~ font~ '\l_fontspec_fontname_tl'~
+ with~ script~ '\l__fontspec_script_name_tl'~ and~ language~ '\l__fontspec_lang_name_tl'.
+ }
+\msg_new:nnn {fontspec} {no-opticals}
+ {
+ '\l_fontspec_fontname_tl'~ doesn't~ appear~ to~ have~ an~ Optical~ Size~ axis.
+ }
+\msg_new:nnn {fontspec} {language-not-exist}
+ {
+ Language~ '#1'~ not~ available~
+ for~ font~ '\l_fontspec_fontname_tl'~
+ with~ script~ '\l__fontspec_script_name_tl'.\\
+ 'Default'~ language~ used~ instead.
+ }
+\msg_new:nnn {fontspec} {only-xetex-feature}
+ {
+ Ignored~ XeTeX~ only~ feature:~ '#1'.
+ }
+\msg_new:nnn {fontspec} {only-luatex-feature}
+ {
+ Ignored~ LuaTeX~ only~ feature:~ '#1'.
+ }
+\msg_new:nnn {fontspec} {no-mapping}
+ {
+ Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX.
+ }
+\msg_new:nnn {fontspec} {no-mapping-ligtex}
+ {
+ Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX.\\
+ Use~ "Ligatures=TeX"~ instead~ of~ "Mapping=tex-text".
+ }
+\msg_new:nnn {fontspec} {cm-default-obsolete}
+ {
+ The~ "cm-default"~ package~ option~ is~ obsolete.
+ }
+\msg_new:nnn {fontspec} {fakebold-only-xetex}
+ {
+ The~ "FakeBold"~ and~ "AutoFakeBold"~ options~ are~ only~ available~ with~ XeLaTeX.\\
+ Option~ ignored.
+ }
+\msg_new:nnn {fontspec} {defining-font}
+ {
+ Font~ family~'\l_fontspec_family_tl'~ created~ for~ font~ '#2'~
+ with~ options~ [\l__fontspec_all_features_clist].\\
+ \\
+ This~ font~ family~ consists~ of~ the~ following~ NFSS~ series/shapes:\\
+ \l_fontspec_defined_shapes_tl
+ }
+\msg_new:nnn {fontspec} {no-font-shape}
+ {
+ Could~ not~ resolve~ font~ #1~ (it~ probably~ doesn't~ exist).
+ }
+\msg_new:nnn {fontspec} {set-scale}
+ {
+ \l_fontspec_fontname_tl\space scale ~=~ \l__fontspec_scale_tl.
+ }
+\msg_new:nnn {fontspec} {setup-math}
+ {
+ Adjusting~ the~ maths~ setup~ (use~ [no-math]~ to~ avoid~ this).
+ }
+\msg_new:nnn {fontspec} {no-scripts}
+ {
+ Font~ \l_fontspec_fontname_tl\space does~ not~ contain~ any~ OpenType~ `Script'~ information.
+ }
+\msg_new:nnn {fontspec} {opa-twice}
+ {
+ Opacity~ set~ twice,~ in~ both~ Colour~ and~ Opacity.\\
+ Using~ specification~ "Opacity=#1".
+ }
+\msg_new:nnn {fontspec} {opa-twice-col}
+ {
+ Opacity~ set~ twice,~ in~ both~ Opacity~ and~ Colour.\\
+ Using~ an~ opacity~ specification~ in~ hex~ of~ "#1/FF".
+ }
+\msg_new:nnn {fontspec} {bad-colour}
+ {
+ Bad~ colour~ declaration~ "#1".~
+ Colour~ must~ be~ one~ of:\\
+ *~ a~ named~ xcolor~ colour\\
+ *~ a~ six-digit~ hex~ colour~ RRGGBB\\
+ *~ an~ eight-digit~ hex~ colour~ RRGGBBTT~ with~ opacity
+ }
+\DeclareOption{cm-default}
+ { \__fontspec_warning:n {cm-default-obsolete} }
+\DeclareOption{math}{\bool_set_true:N \g__fontspec_math_bool}
+\DeclareOption{no-math}{\bool_set_false:N \g__fontspec_math_bool}
+\DeclareOption{config}{\bool_set_true:N \g__fontspec_cfg_bool}
+\DeclareOption{no-config}{\bool_set_false:N \g__fontspec_cfg_bool}
+\DeclareOption{euenc}{\bool_set_true:N \g__fontspec_euenc_bool}
+\DeclareOption{tuenc}{\bool_set_false:N \g__fontspec_euenc_bool}
+\DeclareOption{quiet}
+ {
+ \msg_redirect_module:nnn { fontspec } { warning } { info }
+ \msg_redirect_module:nnn { fontspec } { info } { none }
+ }
+\DeclareOption{silent}
+ {
+ \msg_redirect_module:nnn { fontspec } { warning } { none }
+ \msg_redirect_module:nnn { fontspec } { info } { none }
+ }
+\ExecuteOptions{config,math,euenc}
+\ProcessOptions*
+\tl_set:Nn \g_fontspec_encoding_tl {TU}
+\file_if_exist:nF {tuenc.def} { \bool_set_true:N \g__fontspec_euenc_bool }
+\bool_if:NT \g__fontspec_euenc_bool
+ {
+ \tl_set:Nn \g_fontspec_encoding_tl {EU2}
+ }
\tl_set:Nn \rmdefault {lmr}
\tl_set:Nn \sfdefault {lmss}
\tl_set:Nn \ttdefault {lmtt}
\RequirePackage[\g_fontspec_encoding_tl]{fontenc}
-\tl_set_eq:NN \UTFencname \g_fontspec_encoding_tl % for xunicode
+\tl_set_eq:NN \UTFencname \g_fontspec_encoding_tl % for xunicode if needed
+\normalsize % to overcome the encoding changing the current font size
\tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
\tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
\AtBeginDocument
@@ -31,10 +298,54 @@
\tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
\tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
}
-\cs_set_eq:NN \fontspec_tmp: \XeTeXpicfile
-\cs_set:Npn \XeTeXpicfile {}
-\RequirePackage{xunicode}
-\cs_set_eq:NN \XeTeXpicfile \fontspec_tmp:
+\bool_if:NT \g__fontspec_euenc_bool
+ {
+ \cs_set_eq:NN \fontspec_tmp: \XeTeXpicfile
+ \cs_set:Npn \XeTeXpicfile {}
+ \RequirePackage{xunicode}
+ \cs_set_eq:NN \XeTeXpicfile \fontspec_tmp:
+ }
+
+\cs_set:Nn \__fontspec_fontwrap:n { "#1" }
+\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
+ {
+ \font #1 = #2 ~at~ #3 \scan_stop:
+ }
+
+\cs_set:Npn \__fontspec_primitive_font_gset:Nnn #1#2#3
+ {
+ \global \font #1 = #2 ~at~ #3 \scan_stop:
+ }
+
+\cs_set:Npn \__fontspec_font_suppress_not_found_error:
+ {
+ \int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
+ }
+
+\prg_set_conditional:Nnn \__fontspec_font_if_null:N {p,TF,T,F}
+ {
+ \ifx #1 \nullfont
+ \prg_return_true:
+ \else
+ \prg_return_false:
+ \fi
+ }
+\cs_new:Nn \__fontspec_font_set:Nnn
+ {
+ \__fontspec_primitive_font_set:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
+ }
+\cs_new:Nn \__fontspec_font_gset:Nnn
+ {
+ \__fontspec_primitive_font_gset:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
+ }
+\prg_new_conditional:Nnn \font_glyph_if_exist:Nn {p,TF,T,F}
+ {
+ \etex_iffontchar:D #1 #2 \scan_stop:
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
\cs_new:Nn \__fontspec_pass_args:nnn
{
\IfNoValueTF {#2}
@@ -48,8 +359,8 @@
\cs_new:Nn \__fontspec_fontspec:nn
{
- \fontencoding {\g_fontspec_encoding_tl}
- \fontspec_set_family:Nnn \f@family {#1}{#2}
+ \fontspec_set_family:Nnn \f@family {#1} {#2}
+ \fontencoding { \l__fontspec_nfss_enc_tl }
\selectfont
\ignorespaces
}
@@ -135,8 +446,9 @@
{
\exp_not:N \DeclareRobustCommand \exp_not:N #1
{
- \exp_not:N \fontencoding {\g_fontspec_encoding_tl}
- \exp_not:N \fontfamily { \use:c {g__fontspec_ \cs_to_str:N #1 _family} } \exp_not:N \selectfont
+ \exp_not:N \fontfamily { \use:c {g__fontspec_ \cs_to_str:N #1 _family} }
+ \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
+ \exp_not:N \selectfont
}
}
}
@@ -188,7 +500,13 @@
\tl_set:Nx #1 {#2}
\tl_remove_all:Nn #1 {~}
\clist_map_inline:Nn \l__fontspec_extensions_clist
- { \tl_remove_once:Nn #1 {##1} }
+ {
+ \tl_if_in:NnT #1 {##1}
+ {
+ \tl_remove_once:Nn #1 {##1}
+ \clist_map_break:
+ }
+ }
}
\bool_new:N \l__fontspec_disable_defaults_bool
\DeclareDocumentCommand \addfontfeatures {m}
@@ -196,6 +514,7 @@
\fontspec_if_fontspec_font:TF
{
\group_begin:
+ \keys_set_known:nnN {fontspec-addfeatures} {#1} \l__fontspec_tmp_tl
\prop_get:cnN {g__fontspec_ \f@family _prop} {options} \l__fontspec_options_tl
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontname} \l__fontspec_fontname_tl
\bool_set_true:N \l__fontspec_disable_defaults_bool
@@ -208,7 +527,7 @@
\fontfamily\l_fontspec_family_tl\selectfont
}
{
- \__fontspec_warning:n {addfontfeatures-ignored}
+ \__fontspec_warning:nx {addfontfeatures-ignored} {#1}
}
\ignorespaces
}
@@ -272,48 +591,10 @@
\DeclareDocumentCommand \newfontscript {mm}
{
\fontspec_new_script:nn {#1} {#2}
- \fontspec_new_script:nn {#2} {#2}
- }
-\keys_define:nn { fontspec } { Script .choice: }
-\cs_new:Nn \fontspec_new_script:nn
- {
- \keys_define:nn { fontspec } { Script / #1 .code:n =
- \fontspec_check_script:nTF {#2}
- {
- \tl_set:Nn \l_fontspec_script_tl {#2}
- \int_set:Nn \l_fontspec_script_int {\l_fontspec_strnum_int}
- }
- {
- \fontspec_check_script:nTF {latn}
- {
- \__fontspec_warning:nx {script-not-exist-latn} {#1}
- \keys_set:nn {fontspec} {Script=Latin}
- }
- {
- \__fontspec_warning:nx {script-not-exist} {#1}
- }
- }
- }
}
\DeclareDocumentCommand \newfontlanguage {mm}
{
\fontspec_new_lang:nn {#1} {#2}
- \fontspec_new_lang:nn {#2} {#2}
- }
-\keys_define:nn { fontspec } { Language .choice: }
-\cs_new:Nn \fontspec_new_lang:nn
- {
- \keys_define:nn { fontspec } { Language / #1 .code:n =
- \fontspec_check_lang:nTF {#2}
- {
- \tl_set:Nn \l_fontspec_lang_tl {#2}
- \int_set:Nn \l_fontspec_language_int {\l_fontspec_strnum_int}
- }
- {
- \__fontspec_warning:nx {language-not-exist} {#1}
- \keys_set:nn { fontspec } { Language = Default }
- }
- }
}
\DeclareDocumentCommand \DeclareFontsExtensions {m}
{
@@ -321,6 +602,7 @@
\tl_remove_all:Nn \l__fontspec_extensions_clist {~}
}
\DeclareFontsExtensions{.otf,.ttf,.OTF,.TTF,.ttc,.TTC,.dfont}
+
\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
{
\cs_if_exist:cTF {g__fontspec_ \f@family _prop} \prg_return_true: \prg_return_false:
@@ -501,46 +783,6 @@
\tl_set_eq:NN #1 \l_fontspec_font
\tl_set_eq:NN #2 \l_fontspec_family_tl
}
-\cs_set:Nn \__fontspec_fontwrap:n { "#1" }
-\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
- {
- \font #1 = #2 ~at~ #3 \scan_stop:
- }
-
-\cs_set:Npn \__fontspec_primitive_font_gset:Nnn #1#2#3
- {
- \global \font #1 = #2 ~at~ #3 \scan_stop:
- }
-
-\cs_set:Npn \__fontspec_font_suppress_not_found_error:
- {
- \int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
- }
-
-\prg_set_conditional:Nnn \__fontspec_font_if_null:N {p,TF,T,F}
- {
- \ifx #1 \nullfont
- \prg_return_true:
- \else
- \prg_return_false:
- \fi
- }
-\cs_new:Nn \__fontspec_font_set:Nnn
- {
- \__fontspec_primitive_font_set:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
- }
-\cs_new:Nn \__fontspec_font_gset:Nnn
- {
- \__fontspec_primitive_font_gset:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
- }
-\prg_new_conditional:Nnn \font_glyph_if_exist:Nn {p,TF,T,F}
- {
- \etex_iffontchar:D #1 #2 \scan_stop:
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
\cs_set:Nn \fontspec_select:nn
{
\group_begin:
@@ -564,7 +806,7 @@
{
\__fontspec_save_fontinfo:
\__fontspec_find_autofonts:
- \DeclareFontFamily{\g_fontspec_encoding_tl}{\l_fontspec_family_tl}{}
+ \DeclareFontFamily{\l__fontspec_nfss_enc_tl}{\l_fontspec_family_tl}{}
\__fontspec_set_faces:
\__fontspec_info:nxx {defining-font} {#1} {#2}
}
@@ -742,12 +984,12 @@
}
\cs_new:Nn \__fontspec_set_faces:
{
- \__fontspec_add_nfssfont:oooo \mddefault \updefault \l_fontspec_fontname_tl \l__fontspec_fontfeat_up_clist
- \__fontspec_add_nfssfont:oooo \bfdefault \updefault \l_fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
- \__fontspec_add_nfssfont:oooo \mddefault \itdefault \l_fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
- \__fontspec_add_nfssfont:oooo \mddefault \sldefault \l_fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
- \__fontspec_add_nfssfont:oooo \bfdefault \itdefault \l_fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
- \__fontspec_add_nfssfont:oooo \bfdefault \sldefault \l_fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \updefault \l_fontspec_fontname_tl \l__fontspec_fontfeat_up_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \updefault \l_fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \itdefault \l_fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \sldefault \l_fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \itdefault \l_fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \sldefault \l_fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
\prop_map_inline:Nn \l__fontspec_nfssfont_prop { \__fontspec_set_faces_aux:nnnnn ##2 }
}
@@ -846,9 +1088,10 @@
}
- \__fontspec_declare_shapes_normal:nn {#1} {#2}
- \__fontspec_declare_shape_slanted:nn {#1} {#2}
- \__fontspec_declare_shape_loginfo:nnn {#1} {#2} {#3}
+ \__fontspec_declare_shapes_normal:nn {#1} {#2}
+ \__fontspec_declare_shapes_smcaps:nn {#1} {#2}
+ \__fontspec_declare_shape_slanted:nn {#1} {#2}
+ \__fontspec_declare_shape_loginfo:nn {#1} {#2}
}
\cs_generate_variant:Nn \__fontspec_declare_shape:nnnn {nnxx}
@@ -869,18 +1112,25 @@
}
\cs_new:Nn \__fontspec_declare_shapes_normal:nn
- {
- \__fontspec_DeclareFontShape:xxxxxx {\g_fontspec_encoding_tl} {\l_fontspec_family_tl}
+ {
+ \__fontspec_DeclareFontShape:xxxxxx {\l__fontspec_nfss_enc_tl} {\l_fontspec_family_tl}
{#1} {#2} {\l__fontspec_nfss_tl}{\l__fontspec_postadjust_tl}
+ }
+\cs_new:Nn \__fontspec_declare_shapes_smcaps:nn
+ {
\bool_if:NF \l__fontspec_nosc_bool
{
- \__fontspec_DeclareFontShape:xxxxxx {\g_fontspec_encoding_tl} {\l_fontspec_family_tl}
- {#1}
- {\str_if_eq_x:nnTF {#2} {\itdefault} \sidefault \scdefault}
- {\l__fontspec_nfss_sc_tl}{\l__fontspec_postadjust_tl}
+ \__fontspec_DeclareFontShape:xxxxxx {\l__fontspec_nfss_enc_tl} {\l_fontspec_family_tl} {#1}
+ { \__fontspec_combo_sc_shape:n {#2} } {\l__fontspec_nfss_sc_tl} {\l__fontspec_postadjust_tl}
}
- }
+ }
+\cs_new:Nn \__fontspec_combo_sc_shape:n
+ {
+ \tl_if_exist:cTF { \__fontspec_shape_merge:nn {#1} {\scdefault} }
+ { \tl_use:c { \__fontspec_shape_merge:nn {#1} {\scdefault} } }
+ { \scdefault }
+ }
\cs_new:Nn \__fontspec_DeclareFontShape:nnnnnn
{
@@ -899,40 +1149,44 @@
!(\str_if_eq_x_p:nn {\itdefault} {\sldefault})
}
{
- \__fontspec_DeclareFontShape:xxxxxx {\g_fontspec_encoding_tl}{\l_fontspec_family_tl}{#1}{\sldefault}
+ \__fontspec_DeclareFontShape:xxxxxx {\l__fontspec_nfss_enc_tl}{\l_fontspec_family_tl}{#1}{\sldefault}
{<->ssub*\l_fontspec_family_tl/#1/\itdefault}{\l__fontspec_postadjust_tl}
}
}
-\cs_new:Nn \__fontspec_declare_shape_loginfo:nnn
+\cs_new:Nn \__fontspec_declare_shape_loginfo:nn
{
\tl_gput_right:Nx \l_fontspec_defined_shapes_tl
{
- \exp_not:n { \\ \\ }
- *~ '\exp_not:N \str_case:nnF {#1/#2}
+ -~ \exp_not:N \str_case:nn {#1/#2}
{
- {\mddefault/\updefault} {normal}
- {\bfdefault/\updefault} {bold}
- {\mddefault/\itdefault} {italic}
- {\bfdefault/\itdefault} {bold~ italic}
- } {#2/#3}'~
- with~ NFSS~ spec.: \exp_not:N \\
+ {\mddefault/\updefault} {'normal'~}
+ {\bfdefault/\updefault} {'bold'~}
+ {\mddefault/\itdefault} {'italic'~}
+ {\mddefault/\sldefault} {'slanted'~}
+ {\bfdefault/\itdefault} {'bold~ italic'~}
+ {\bfdefault/\sldefault} {'bold~ slanted'~}
+ } (#1/#2)~
+ with~ NFSS~ spec.:~
\l__fontspec_nfss_tl
- \exp_not:n { \\ \\ }
- *~ '\exp_not:N \str_case:nnF {#1/\scdefault}
+ \exp_not:n { \\ }
+ -~ \exp_not:N \str_case:nn { #1 / \__fontspec_combo_sc_shape:n {#2} }
{
- {\mddefault/\scdefault} {small~ caps}
- {\bfdefault/\scdefault} {bold~ small~ caps}
- {\mddefault/\sidefault} {italic~ small~ caps}
- {\bfdefault/\sidefault} {bold~ italic~ small~ caps}
- } {#2/#3}'~
- with~ NFSS~ spec.: \exp_not:N \\
+ {\mddefault/\scdefault} {'small~ caps'~}
+ {\bfdefault/\scdefault} {'bold~ small~ caps'~}
+ {\mddefault/\itscdefault} {'italic~ small~ caps'~}
+ {\bfdefault/\itscdefault} {'bold~ italic~ small~ caps'~}
+ {\mddefault/\slscdefault} {'slanted~ small~ caps'~}
+ {\bfdefault/\slscdefault} {'bold~ slanted~ small~ caps'~}
+ }~( #1 / \__fontspec_combo_sc_shape:n {#2} )~
+ with~ NFSS~ spec.:~
\l__fontspec_nfss_sc_tl
- \tl_if_empty:NF \l__fontspec_postadjust_tl
+ \tl_if_empty:fF {\l__fontspec_postadjust_tl}
{
\exp_not:N \\ and~ font~ adjustment~ code: \exp_not:N \\ \l__fontspec_postadjust_tl
}
}
}
+\cs_generate_variant:Nn \tl_if_empty:nF {f}
\clist_set:Nn \l__fontspec_pre_feat_sclist
{
mode = \l_fontspec_mode_tl ;
@@ -999,6 +1253,7 @@
\tl_clear:N \l_fontspec_renderer_tl
\tl_clear:N \l_fontspec_defined_shapes_tl
\tl_clear:N \g__fontspec_curr_series_tl
+ \tl_gset_eq:NN \l__fontspec_nfss_enc_tl \g_fontspec_encoding_tl
% This is for detecting font families when assigning default features.
% Replace defaults for the standard families because they're not set in the usual way:
@@ -1145,7 +1400,7 @@
\prg_new_conditional:Nnn \fontspec_check_script:n {TF}
{
\directlua{fontspec.check_ot_script("l_fontspec_font", "#1")}
- \if@tempswa \prg_return_true: \else: \prg_return_false: \fi:
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
\prg_new_conditional:Nnn \fontspec_check_lang:n {TF}
{
@@ -1153,7 +1408,7 @@
{
fontspec.check_ot_lang( "l_fontspec_font", "#1", "\l_fontspec_script_tl" )
}
- \if@tempswa \prg_return_true: \else: \prg_return_false: \fi:
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
\prg_new_conditional:Nnn \fontspec_check_ot_feat:n {TF,T}
{
@@ -1164,12 +1419,18 @@
"\l_fontspec_lang_tl", "\l_fontspec_script_tl"
)
}
- \if@tempswa \prg_return_true: \else: \prg_return_false: \fi:
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
+
\cs_new:Nn \__fontspec_keys_define_code:nnn
{
\keys_define:nn {#1} { #2 .code:n = {#3} }
}
+\cs_new:Nn \__fontspec_aff_error:n
+ {
+ \__fontspec_keys_define_code:nnn {fontspec-addfeatures} {#1}
+ { \__fontspec_error:nx {not-in-addfontfeatures} {#1} }
+ }
\bool_new:N \l__fontspec_external_bool
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {ExternalLocation}
{
@@ -1361,6 +1622,10 @@
{
\fontspec_complete_fontname:Nn \l__fontspec_sizedfont_tl {#1}
}
+\__fontspec_keys_define_code:nnn {fontspec-preparse} {NFSSEncoding}
+ {
+ \tl_gset:Nx \l__fontspec_nfss_enc_tl { #1 }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {NFSSFamily}
{
\tl_set:Nx \l__fontspec_nfss_fam_tl { #1 }
@@ -1383,7 +1648,7 @@
}
}
- \__fontspec_add_nfssfont:oooo
+ \__fontspec_add_nfssfont:nnnn
{\use_i:nnn #1}{\use_ii:nnn #1}{\l__fontspec_this_font_tl}{\l__fontspec_this_feat_tl}
}
\cs_new:Nn \__fontspec_add_nfssfont:nnnn
@@ -1400,8 +1665,6 @@
{ {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
}
}
-\cs_generate_variant:Nn \__fontspec_add_nfssfont:nnnn {ooo}
-\cs_generate_variant:Nn \__fontspec_add_nfssfont:nnnn {oooo}
\__fontspec_keys_define_code:nnn {fontspec} {Scale}
{
\str_case:nnF {#1}
@@ -1447,6 +1710,7 @@
\bool_if:NF \l__fontspec_firsttime_bool
{ \_fontspec_parse_wordspace:w #1,,,\q_stop }
}
+\__fontspec_aff_error:n {WordSpace}
\cs_set:Npn \_fontspec_parse_wordspace:w #1,#2,#3,#4 \q_stop
{
\tl_if_empty:nTF {#4}
@@ -1487,6 +1751,7 @@
{ \fontdimen 7 \font = #1 \fontdimen 7 \font }
}
}
+\__fontspec_aff_error:n {PunctuationSpace}
\__fontspec_keys_define_code:nnn {fontspec} {FontAdjustment}
{
\tl_put_right:Nx \l__fontspec_postadjust_tl {#1}
@@ -1497,6 +1762,9 @@
}
\__fontspec_keys_define_code:nnn {fontspec} {HyphenChar}
{
+ \bool_if:NT \l__fontspec_addfontfeatures_bool
+ { \__fontspec_error:nx {not-in-addfontfeatures} {HyphenChar} }
+
\str_if_eq:nnTF {#1} {None}
{
\tl_put_right:Nn \l__fontspec_postadjust_tl
@@ -1517,6 +1785,7 @@
{ \__fontspec_error:nx {no-glyph}{#1} }
}
}
+\__fontspec_aff_error:n {HyphenChar}
\__fontspec_keys_define_code:nnn {fontspec} {Color}
{
\cs_if_exist:cTF { \token_to_str:N \color@ #1 }
@@ -1560,7 +1829,7 @@
\tl_set:Nx \l__fontspec_opacity_tl
{
\int_compare:nT { \l__fontspec_tmp_int <= "F } {0} % zero pad
- \int_to_hexadecimal:n { \l__fontspec_tmp_int }
+ \int_to_hex:n { \l__fontspec_tmp_int }
}
}
\__fontspec_keys_define_code:nnn {fontspec} {Mapping}
@@ -1863,8 +2132,34 @@
}
}
}
+\keys_define:nn { fontspec } { Script .choice: }
+\cs_new:Nn \fontspec_new_script:nn
+ {
+ \keys_define:nn { fontspec } { Script / #1 .code:n =
+ \clist_map_inline:nn {#2}
+ {
+ \fontspec_check_script:nTF {####1}
+ {
+ \tl_set:Nn \l_fontspec_script_tl {####1}
+ \int_set:Nn \l_fontspec_script_int {\l_fontspec_strnum_int}
+ \clist_map_break:
+ }
+ {
+ \fontspec_check_script:nTF {latn}
+ {
+ \__fontspec_warning:nx {script-not-exist-latn} {#1}
+ \keys_set:nn {fontspec} {Script=Latin}
+ }
+ {
+ \__fontspec_warning:nx {script-not-exist} {#1}
+ }
+ }
+ }
+ }
+ }
\newfontscript{Arabic}{arab} \newfontscript{Armenian}{armn}
-\newfontscript{Balinese}{bali} \newfontscript{Bengali}{beng}
+\newfontscript{Balinese}{bali}
+\newfontscript{Bengali}{bng2,beng}
\newfontscript{Bopomofo}{bopo} \newfontscript{Braille}{brai}
\newfontscript{Buginese}{bugi} \newfontscript{Buhid}{buhd}
\newfontscript{Byzantine~Music}{byzm}
@@ -1873,24 +2168,29 @@
\newfontscript{CJK~Ideographic}{hani} \newfontscript{Coptic}{copt}
\newfontscript{Cypriot~Syllabary}{cprt} \newfontscript{Cyrillic}{cyrl}
\newfontscript{Default}{DFLT} \newfontscript{Deseret}{dsrt}
-\newfontscript{Devanagari}{deva} \newfontscript{Ethiopic}{ethi}
+\newfontscript{Devanagari}{dev2,deva}
+\newfontscript{Ethiopic}{ethi}
\newfontscript{Georgian}{geor} \newfontscript{Glagolitic}{glag}
\newfontscript{Gothic}{goth} \newfontscript{Greek}{grek}
-\newfontscript{Gujarati}{gujr} \newfontscript{Gurmukhi}{guru}
+\newfontscript{Gujarati}{gjr2,gujr}
+\newfontscript{Gurmukhi}{gur2,guru}
\newfontscript{Hangul~Jamo}{jamo} \newfontscript{Hangul}{hang}
\newfontscript{Hanunoo}{hano} \newfontscript{Hebrew}{hebr}
\newfontscript{Hiragana~and~Katakana}{kana}
-\newfontscript{Javanese}{java} \newfontscript{Kannada}{knda}
+\newfontscript{Javanese}{java}
+\newfontscript{Kannada}{knd2,knda}
\newfontscript{Kharosthi}{khar} \newfontscript{Khmer}{khmr}
\newfontscript{Lao}{lao~} \newfontscript{Latin}{latn}
\newfontscript{Limbu}{limb} \newfontscript{Linear~B}{linb}
-\newfontscript{Malayalam}{mlym} \newfontscript{Math}{math}
+\newfontscript{Malayalam}{mlm2,mlym}
+\newfontscript{Math}{math}
\newfontscript{Mongolian}{mong}
\newfontscript{Musical~Symbols}{musc} \newfontscript{Myanmar}{mymr}
\newfontscript{N'ko}{nko~} \newfontscript{Ogham}{ogam}
\newfontscript{Old~Italic}{ital}
\newfontscript{Old~Persian~Cuneiform}{xpeo}
-\newfontscript{Oriya}{orya} \newfontscript{Osmanya}{osma}
+\newfontscript{Oriya}{ory2,orya}
+\newfontscript{Osmanya}{osma}
\newfontscript{Phags-pa}{phag} \newfontscript{Phoenician}{phnx}
\newfontscript{Runic}{runr} \newfontscript{Shavian}{shaw}
\newfontscript{Sinhala}{sinh}
@@ -1898,13 +2198,29 @@
\newfontscript{Syloti~Nagri}{sylo} \newfontscript{Syriac}{syrc}
\newfontscript{Tagalog}{tglg} \newfontscript{Tagbanwa}{tagb}
\newfontscript{Tai~Le}{tale} \newfontscript{Tai~Lu}{talu}
-\newfontscript{Tamil}{taml} \newfontscript{Telugu}{telu}
+\newfontscript{Tamil}{tml2,taml}
+\newfontscript{Telugu}{tel2,telu}
\newfontscript{Thaana}{thaa} \newfontscript{Thai}{thai}
\newfontscript{Tibetan}{tibt} \newfontscript{Tifinagh}{tfng}
\newfontscript{Ugaritic~Cuneiform}{ugar}\newfontscript{Yi}{yi~~}
\newfontscript{Kana}{kana}
\newfontscript{Maths}{math}
\newfontscript{CJK}{hani}
+\keys_define:nn { fontspec } { Language .choice: }
+\cs_new:Nn \fontspec_new_lang:nn
+ {
+ \keys_define:nn { fontspec } { Language / #1 .code:n =
+ \fontspec_check_lang:nTF {#2}
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {#2}
+ \int_set:Nn \l_fontspec_language_int {\l_fontspec_strnum_int}
+ }
+ {
+ \__fontspec_warning:nx {language-not-exist} {#1}
+ \keys_set:nn { fontspec } { Language = Default }
+ }
+ }
+ }
\newfontlanguage{Abaza}{ABA}\newfontlanguage{Abkhazian}{ABK}
\newfontlanguage{Adyghe}{ADY}\newfontlanguage{Afrikaans}{AFK}
\newfontlanguage{Afar}{AFR}\newfontlanguage{Agaw}{AGW}
@@ -2131,43 +2447,6 @@
{
\__fontspec_update_featstr:n {#1}
}
-\providecommand*{\sidefault}{si}
-\DeclareRobustCommand{\sishape}
- {
- \not@math@alphabet\sishape\relax
- \fontshape\sidefault\selectfont
- }
-\DeclareTextFontCommand{\textsi}{\sishape}
-\cs_new:Nn \fontspec_blend_shape:nnn
- {
- \bool_if:nTF
- {
- \str_if_eq_x_p:nn {\f@shape} {#2} &&
- \cs_if_exist_p:c {\f@encoding/\f@family/\f@series/#3}
- }
- { \fontshape{#3}\selectfont }
- { \fontshape{#1}\selectfont }
- }
-\DeclareRobustCommand \itshape
- {
- \not@math@alphabet\itshape\mathit
- \fontspec_blend_shape:nnn\itdefault\scdefault\sidefault
- }
-\DeclareRobustCommand \slshape
- {
- \not@math@alphabet\slshape\relax
- \fontspec_blend_shape:nnn\sldefault\scdefault\sidefault
- }
-\DeclareRobustCommand \scshape
- {
- \not@math@alphabet\scshape\relax
- \fontspec_blend_shape:nnn\scdefault\itdefault\sidefault
- }
-\DeclareRobustCommand \upshape
- {
- \not@math@alphabet\upshape\relax
- \fontspec_blend_shape:nnn\updefault\sidefault\scdefault
- }
\@ifpackageloaded{euler}
{
\bool_set_true:N \g__fontspec_pkg_euler_loaded_bool
@@ -2270,7 +2549,7 @@
{
\ifx\define@antt@mathversions a\bool_set_false:N \g__fontspec_math_bool\fi
}{}
- \@ifpackageloaded{arev}{\bool_set_false:N \g__fontspec_math_bool}{}
+ \@ifpackageloaded{arevmath}{\bool_set_false:N \g__fontspec_math_bool}{}
\@ifpackageloaded{eulervm}{\bool_set_false:N \g__fontspec_math_bool}{}
\@ifpackageloaded{mathdesign}{\bool_set_false:N \g__fontspec_math_bool}{}
\@ifpackageloaded{concmath}{\bool_set_false:N \g__fontspec_math_bool}{}
@@ -2303,39 +2582,201 @@
}
}
\AtBeginDocument{\fontspec_maybe_setup_maths:}
+\tl_set:Nn \zf@enc { \g_fontspec_encoding_tl }
+\cs_set:Npn \zf@fontspec #1 #2
+ {
+ \fontspec_select:nn {#1} {#2}
+ \tl_set:Nn \zf@family { \l_fontspec_family_tl }
+ \tl_set:Nn \zf@basefont { \l_fontspec_font }
+ }
\bool_if:NT \g__fontspec_cfg_bool
{
\InputIfFileExists{fontspec.cfg}
{}
{\typeout{No~ fontspec.cfg~ file~ found;~ no~ configuration~ loaded.}}
}
-\tl_set:Nn \zf@enc { \g_fontspec_encoding_tl }
-\cs_set:Npn \zf@fontspec #1 #2
+\providecommand*\itscdefault{\itdefault\scdefault}
+\providecommand*\slscdefault{\sldefault\scdefault}
+\DeclareRobustCommand{\sishape}
{
- \fontspec_select:nn {#1} {#2}
- \tl_set:Nn \zf@family { \l_fontspec_family_tl }
- \tl_set:Nn \zf@basefont { \l_fontspec_font }
+ \not@math@alphabet\sishape\relax
+ \fontshape{\itscdefault}\selectfont
}
-\ExplSyntaxOff
-%%
-%% Copyright 2004--2015 Will Robertson <wspr81@gmail.com>
+\DeclareTextFontCommand{\textsi}{\sishape}
+\cs_new:Nn \__fontspec_shape_merge:nn { c__fontspec_shape_#1_#2_tl }
+\tl_const:cn { \__fontspec_shape_merge:nn \itdefault \scdefault } {\itscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \sldefault \scdefault } {\slscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \scdefault \itdefault } {\itscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \scdefault \sldefault } {\slscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \slscdefault \itdefault } {\itscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \itscdefault \sldefault } {\slscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \itscdefault \updefault } {\scdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \slscdefault \updefault } {\scdefault}
+\cs_new:Nn \fontspec_merge_shape:n
+ {
+ \bool_if:nTF
+ {
+ \tl_if_exist_p:c { \__fontspec_shape_merge:nn {\f@shape} {#1} } &&
+ \cs_if_exist_p:c
+ {
+ \f@encoding/\f@family/\f@series/
+ \tl_use:c { \__fontspec_shape_merge:nn {\f@shape} {#1} }
+ }
+ }
+ { \fontshape { \tl_use:c { \__fontspec_shape_merge:nn {\f@shape} {#1} } } \selectfont }
+ { \fontshape {#1} \selectfont }
+ }
+\DeclareRobustCommand \itshape
+ {
+ \not@math@alphabet\itshape\mathit
+ \fontspec_merge_shape:n\itdefault
+ }
+\DeclareRobustCommand \slshape
+ {
+ \not@math@alphabet\slshape\relax
+ \fontspec_merge_shape:n\sldefault
+ }
+\DeclareRobustCommand \scshape
+ {
+ \not@math@alphabet\scshape\relax
+ \fontspec_merge_shape:n\scdefault
+ }
+\DeclareRobustCommand \upshape
+ {
+ \not@math@alphabet\upshape\relax
+ \fontspec_merge_shape:n\updefault
+ }
+\int_new:N \l__fontspec_em_int
+\int_new:N \l__fontspec_emdef_int
+\cs_new_protected:Npn \emfontdeclare #1
+ {
+ \int_zero:N \l__fontspec_emdef_int
+ \clist_map_inline:nn {#1}
+ {
+ \int_incr:N \l__fontspec_emdef_int
+ \cs_set:cpn {__fontspec_em_font_ \int_use:N \l__fontspec_emdef_int _switch:} {##1}
+ }
+ }
+\DeclareRobustCommand \em
+ {
+ \@nomath\em
+ \int_incr:N \l__fontspec_em_int
+ \use:c {__fontspec_em_font_ \int_use:N \l__fontspec_em_int _switch:}
+ }
+\DeclareTextFontCommand{\emph}{\em}
+\cs_set:Npn \emshape { \itshape }
+\cs_set:Npn \eminnershape { \upshape }
+\emfontdeclare{ \emshape, \eminnershape }
+\DeclareRobustCommand{\-}
+ {
+ \discretionary
+ {
+ \char\ifnum\hyphenchar\font<\z@
+ \xlx@defaulthyphenchar
+ \else
+ \hyphenchar\font
+ \fi
+ }{}{}
+ }
+\def\xlx@defaulthyphenchar{`\-}
+\cs_new:Nn \fontspec_visible_space:
+ {
+ \font_glyph_if_exist:NnTF \font {"2423}
+ { \char"2423\scan_stop: }
+ { \fontspec_visible_space_fallback: }
+ }
+\cs_new:Nn \fontspec_visible_space_fallback:
+ {
+ {
+ \usefont{\g_fontspec_encoding_tl}{lmtt}{\f@series}{\f@shape}
+ \textvisiblespace
+ }
+ }
+\group_begin:
+\char_set_catcode_active:n{"20}%
+\cs_gset:Npn\fontspec_print_visible_spaces:{%
+\char_set_catcode_active:n{"20}%
+\cs_set_eq:NN^^20\fontspec_visible_space:%
+}%
+\group_end:
+\def\verb
+ {
+ \relax\ifmmode\hbox\else\leavevmode\null\fi
+ \bgroup
+ \verb@eol@error \let\do\@makeother \dospecials
+ \verbatim@font\@noligs
+ \@ifstar\__fontspecsverb\@verb
+ }
+\def\__fontspecsverb{\fontspec_print_visible_spaces:\@sverb}
+\AtBeginDocument
+ {
+ \fontspec_patch_verbatim:
+ \fontspec_patch_moreverb:
+ \fontspec_patch_fancyvrb:
+ \fontspec_patch_listings:
+ }
+\cs_set:Npn \fontspec_patch_verbatim:
+ {
+ \@ifpackageloaded{verbatim}
+ {
+ \cs_set:cpn {verbatim*}
+ {
+ \group_begin: \@verbatim \fontspec_print_visible_spaces: \verbatim@start
+ }
+ }
+ {
+ \cs_set:cpn {verbatim*}
+ {
+ \@verbatim \fontspec_print_visible_spaces: \@sxverbatim
+ }
+ }
+ }
+\cs_set:Npn \fontspec_patch_moreverb:
+ {
+ \@ifpackageloaded{moreverb}{
+ \cs_set:cpn {listingcont*}
+ {
+ \cs_set:Npn \verbatim@processline
+ {
+ \thelisting@line \global\advance\listing@line\c_one
+ \the\verbatim@line\par
+ }
+ \@verbatim \fontspec_print_visible_spaces: \verbatim@start
+ }
+ }{}
+ }
+\cs_set:Npn \fontspec_patch_fancyvrb:
+ {
+ \@ifpackageloaded{fancyvrb}
+ {
+ \cs_set_eq:NN \FancyVerbSpace \fontspec_visible_space:
+ }{}
+ }
+\cs_set:Npn \fontspec_patch_listings:
+ {
+ \@ifpackageloaded{listings}
+ {
+ \cs_set_eq:NN \lst@visiblespace \fontspec_visible_space:
+ }{}
+ }
+\RenewDocumentCommand \oldstylenums {m}
+ {
+ { \addfontfeature{Numbers=OldStyle} #1 }
+ }
+\NewDocumentCommand \liningnums {m}
+ {
+ { \addfontfeature{Numbers=Lining} #1 }
+ }
+%% ------------------------------------------------
+%% Copyright 2004--2016 Will Robertson <wspr81@gmail.com>
%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
%%
-%% Distributable under the LaTeX Project Public License,
-%% version 1.3c or higher (your choice). The latest version of
-%% this license is at: http://www.latex-project.org/lppl.txt
+%% 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.
-%%
-%% This work consists of this file fontspec.dtx
-%% and the derived files fontspec.sty,
-%% fontspec.lua,
-%% fontspec.cfg,
-%% fontspec-xetex.sty,
-%% fontspec-luatex.sty,
-%% fontspec-patches.sty,
-%% fontspec-example.tex,
-%% and fontspec.pdf.
-%%
+%% It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec-example.tex.
+%% And the derived files: fontspec*.sty,fontspec.lua, and fontspec.pdf.
+%% ------------------------------------------------
%%
%% End of file `fontspec-luatex.sty'.
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
deleted file mode 100644
index dc8ff1fe51d..00000000000
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
+++ /dev/null
@@ -1,181 +0,0 @@
-%%
-%% This is file `fontspec-patches.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% fontspec.dtx (with options: `patches')
-%%
-%% _________________________________________
-%% The fontspec package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2015 Will Robertson and Khaled Hosny
-%%
-%% License information appended.
-%%
-%%
-\ProvidesPackage{fontspec-patches}
- [2015/09/24 v2.4e Font selection for XeLaTeX and LuaLaTeX]
-
-
-\ExplSyntaxOn
-\cs_if_exist:NF \TextOrMath
- {
- % copy official definition:
- \protected\expandafter\def\csname TextOrMath\space\endcsname{%
- \ifmmode \expandafter\@secondoftwo
- \else \expandafter\@firstoftwo \fi}
- \edef\TextOrMath#1#2{%
- \expandafter\noexpand\csname TextOrMath\space\endcsname
- {#1}{#2}}
- % translation of official definition:
- \cs_set:Npn \@fnsymbol #1
- {
- \int_case:nnF {#1}
- {
- {0} {}
- {1} { \TextOrMath \textasteriskcentered* }
- {2} { \TextOrMath \textdagger\dagger }
- {3} { \TextOrMath \textdaggerdbl\ddagger }
- {4} { \TextOrMath \textsection\mathsection }
- {5} { \TextOrMath \textparagraph\mathparagraph }
- {6} { \TextOrMath \textbardbl\| }
- {7} { \TextOrMath {\textasteriskcentered\textasteriskcentered}{**} }
- {8} { \TextOrMath {\textdagger\textdagger}{\dagger\dagger} }
- {9} { \TextOrMath {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger} }
- }
- { \@ctrerr }
- }
- }
-\DeclareRobustCommand \em
- {
- \@nomath\em
- \str_if_eq_x:nnTF \f@shape \itdefault \eminnershape
- {
- \str_if_eq_x:nnTF \f@shape \sldefault \eminnershape \emshape
- }
- }
-\DeclareTextFontCommand{\emph}{\em}
-\cs_set_eq:NN \emshape \itshape
-\cs_set_eq:NN \eminnershape \upshape
-\DeclareRobustCommand{\-}
- {
- \discretionary
- {
- \char\ifnum\hyphenchar\font<\z@
- \xlx@defaulthyphenchar
- \else
- \hyphenchar\font
- \fi
- }{}{}
- }
-\def\xlx@defaulthyphenchar{`\-}
-\cs_new:Nn \fontspec_visible_space:
- {
- \font_glyph_if_exist:NnTF \font {"2423}
- { \char"2423\scan_stop: }
- { \fontspec_visible_space_fallback: }
- }
-\cs_new:Nn \fontspec_visible_space_fallback:
- {
- {
- \usefont{\g_fontspec_encoding_tl}{lmtt}{\f@series}{\f@shape}
- \textvisiblespace
- }
- }
-\group_begin:
-\char_set_catcode_active:n{"20}%
-\cs_gset:Npn\fontspec_print_visible_spaces:{%
-\char_set_catcode_active:n{"20}%
-\cs_set_eq:NN^^20\fontspec_visible_space:%
-}%
-\group_end:
-\def\verb
- {
- \relax\ifmmode\hbox\else\leavevmode\null\fi
- \bgroup
- \verb@eol@error \let\do\@makeother \dospecials
- \verbatim@font\@noligs
- \@ifstar\__fontspecsverb\@verb
- }
-\def\__fontspecsverb{\fontspec_print_visible_spaces:\@sverb}
-\AtBeginDocument
- {
- \fontspec_patch_verbatim:
- \fontspec_patch_moreverb:
- \fontspec_patch_fancyvrb:
- \fontspec_patch_listings:
- }
-\cs_set:Npn \fontspec_patch_verbatim:
- {
- \@ifpackageloaded{verbatim}
- {
- \cs_set:cpn {verbatim*}
- {
- \group_begin: \@verbatim \fontspec_print_visible_spaces: \verbatim@start
- }
- }
- {
- \cs_set:cpn {verbatim*}
- {
- \@verbatim \fontspec_print_visible_spaces: \@sxverbatim
- }
- }
- }
-\cs_set:Npn \fontspec_patch_moreverb:
- {
- \@ifpackageloaded{moreverb}{
- \cs_set:cpn {listingcont*}
- {
- \cs_set:Npn \verbatim@processline
- {
- \thelisting@line \global\advance\listing@line\c_one
- \the\verbatim@line\par
- }
- \@verbatim \fontspec_print_visible_spaces: \verbatim@start
- }
- }{}
- }
-\cs_set:Npn \fontspec_patch_fancyvrb:
- {
- \@ifpackageloaded{fancyvrb}
- {
- \cs_set_eq:NN \FancyVerbSpace \fontspec_visible_space:
- }{}
- }
-\cs_set:Npn \fontspec_patch_listings:
- {
- \@ifpackageloaded{listings}
- {
- \cs_set_eq:NN \lst@visiblespace \fontspec_visible_space:
- }{}
- }
-\RenewDocumentCommand \oldstylenums {m}
- {
- { \addfontfeature{Numbers=OldStyle} #1 }
- }
-\NewDocumentCommand \liningnums {m}
- {
- { \addfontfeature{Numbers=Lining} #1 }
- }
-%%
-%% Copyright 2004--2015 Will Robertson <wspr81@gmail.com>
-%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
-%%
-%% Distributable under the LaTeX Project Public License,
-%% version 1.3c or higher (your choice). The latest version of
-%% this license is at: http://www.latex-project.org/lppl.txt
-%%
-%% This work is "maintained" by Will Robertson.
-%%
-%% This work consists of this file fontspec.dtx
-%% and the derived files fontspec.sty,
-%% fontspec.lua,
-%% fontspec.cfg,
-%% fontspec-xetex.sty,
-%% fontspec-luatex.sty,
-%% fontspec-patches.sty,
-%% fontspec-example.tex,
-%% and fontspec.pdf.
-%%
-%%
-%% End of file `fontspec-patches.sty'.
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
index f1815624afc..e116c14c8bc 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
@@ -5,25 +5,292 @@
%% The original source files were:
%%
%% fontspec.dtx (with options: `fontspec,xetexx')
-%%
-%% _________________________________________
-%% The fontspec package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2015 Will Robertson and Khaled Hosny
-%%
-%% License information appended.
-%%
-%%
-\ProvidesPackage{fontspec-xetex}
- [2015/09/24 v2.4e Font selection for XeLaTeX and LuaLaTeX]
-
+%% fontspec-vars.dtx (with options: `vars')
+%% fontspec-msg.dtx (with options: `msg')
+%% fontspec-opening.dtx (with options: `fontspec,xetexx')
+%% fontspec-fontload.dtx (with options: `fontspec,xetexx')
+%% fontspec-user.dtx (with options: `fontspec,xetexx')
+%% fontspec-api.dtx (with options: `fontspec,xetexx')
+%% fontspec-internal.dtx (with options: `fontspec,xetexx')
+%% fontspec-keyval.dtx (with options: `fontspec,xetexx')
+%% fontspec-math.dtx (with options: `fontspec,xetexx')
+%% fontspec-closing.dtx (with options: `fontspec,xetexx')
+%% fontspec-patches.dtx (with options: `patches')
+%% ------------------------------------------------
+%% The FONTSPEC package for XeLaTeX/LuaLaTeX
+%% (C) 2004--2016 Will Robertson and Khaled Hosny
+%% License information appended.
+%% ------------------------------------------------
+\RequirePackage{expl3}
+\RequirePackage{xparse}
+\ProvidesExplPackage{fontspec-xetex}%
+ {2016/01/30}{2.5}{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
+\bool_new:N \l__fontspec_nosc_bool
+\bool_new:N \l__fontspec_check_bool
+\cs_new:Npn \FontspecSetCheckBoolTrue { \bool_set_true:N \l__fontspec_check_bool }
+\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l__fontspec_check_bool }
+\bool_new:N \l__fontspec_tfm_bool
+\bool_new:N \l__fontspec_atsui_bool
+\bool_new:N \l__fontspec_ot_bool
+\bool_new:N \l__fontspec_mm_bool
+\bool_new:N \l__fontspec_graphite_bool
+\bool_new:N \g__fontspec_math_euler_bool
+\bool_new:N \g__fontspec_math_lucida_bool
+\bool_new:N \g__fontspec_pkg_euler_loaded_bool
+\bool_new:N \g__fontspec_cfg_bool
+\bool_new:N \g__fontspec_math_bool
+\bool_new:N \g__fontspec_euenc_bool
+\int_new:N \l_fontspec_script_int
+\int_new:N \l_fontspec_language_int
+\int_new:N \l_fontspec_strnum_int
+\fp_new:N \l__fontspec_tmpa_fp
+\fp_new:N \l__fontspec_tmpb_fp
+\dim_new:N \l__fontspec_tmpa_dim
+\dim_new:N \l__fontspec_tmpb_dim
+\dim_new:N \l__fontspec_tmpc_dim
+\tl_set:Nx \c_colon_str { \tl_to_str:N : }
+\cs_set:Npn \use_v:nnnnn #1#2#3#4#5 {#5}
+\cs_set:Npn \use_iv:nnnnn #1#2#3#4#5 {#4}
+\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
+\cs_generate_variant:Nn \int_set:Nn {Nv}
+\cs_generate_variant:Nn \keys_set:nn {nx}
+\cs_generate_variant:Nn \keys_set_known:nnN {nx}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
+\cs_new:Nn \__fontspec_int_mult_truncate:Nn
+ {
+ \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
+ }
-\ExplSyntaxOn
-\tl_set:Nn \g_fontspec_encoding_tl {EU1}
+\cs_new:Npn \__fontspec_error:n { \msg_error:nn {fontspec} }
+\cs_new:Npn \__fontspec_error:nx { \msg_error:nnx {fontspec} }
+\cs_new:Npn \__fontspec_warning:n { \msg_warning:nn {fontspec} }
+\cs_new:Npn \__fontspec_warning:nx { \msg_warning:nnx {fontspec} }
+\cs_new:Npn \__fontspec_warning:nxx { \msg_warning:nnxx {fontspec} }
+\cs_new:Npn \__fontspec_info:n { \msg_info:nn {fontspec} }
+\cs_new:Npn \__fontspec_info:nx { \msg_info:nnx {fontspec} }
+\cs_new:Npn \__fontspec_info:nxx { \msg_info:nnxx {fontspec} }
+\cs_new:Npn \__fontspec_trace:n { \msg_trace:nn {fontspec} }
+\msg_new:nnn {fontspec} {no-size-info}
+ {
+ Size~ information~ must~ be~ supplied.\\
+ For~ example,~ SizeFeatures={Size={8-12},...}.
+ }
+\msg_new:nnnn {fontspec} {font-not-found}
+ {
+ The~ font~ "#1"~ cannot~ be~ found.
+ }
+ {
+ A~font~might~not~be~found~for~many~reasons.\\
+ Check~the~spelling,~where~the~font~is~installed~etc.~etc.\\\\
+ When~in~doubt,~ask~someone~for~help!
+ }
+\msg_new:nnnn {fontspec} {rename-feature-not-exist}
+ {
+ The~ feature~ #1~ doesn't~ appear~ to~ be~ defined.
+ }
+ {
+ It~ looks~ like~ you're~ trying~ to~ rename~ a~ feature~ that~ doesn't~ exist.
+ }
+\msg_new:nnn {fontspec} {no-glyph}
+ {
+ '\l_fontspec_fontname_tl'~ does~ not~ contain~ glyph~ #1.
+ }
+\msg_new:nnnn {fontspec} {euler-too-late}
+ {
+ The~ euler~ package~ must~ be~ loaded~ BEFORE~ fontspec.
+ }
+ {
+ fontspec~ only~ overwrites~ euler's~ attempt~ to~
+ define~ the~ maths~ text~ fonts~ if~ fontspec~ is~
+ loaded~ after~ euler.~ Type~ <return>~ to~ proceed~
+ with~ incorrect~ \string\mathit,~ \string\mathbf,~ etc.
+ }
+\msg_new:nnnn {fontspec} {no-xcolor}
+ {
+ Cannot~ load~ named~ colours~ without~ the~ xcolor~ package.
+ }
+ {
+ Sorry,~ I~ can't~ do~ anything~ to~ help.~ Instead~ of~ loading~
+ the~ color~ package,~ use~ xcolor~ instead.~ It's~ better.
+ }
+\msg_new:nnnn {fontspec} {unknown-color-model}
+ {
+ Error~ loading~ colour~ `#1';~ unknown~ colour~ model.
+ }
+ {
+ Sorry,~ I~ can't~ do~ anything~ to~ help.~ Please~ report~ this~ error~
+ to~ my~ developer~ with~ a~ minimal~ example~ that~ causes~ the~ problem.
+ }
+\msg_new:nnnn {fontspec} {not-in-addfontfeatures}
+ {
+ The~ "#1"~ font~ feature~ cannot~ be~ used~ in~ \string\addfontfeatures.
+ }
+ {
+ This~ is~ due~ to~ how~ TeX~ loads~ fonts;~ such~ settings~
+ are~ global~ so~ adding~ them~ mid-document~ within~ a~ group~ causes~
+ confusion.~ You'll~ need~ to~ define~ multiple~ font~ families~ to~ achieve~
+ what~ you~ want.
+ }
+\msg_new:nnn {fontspec} {addfontfeatures-ignored}
+ {
+ \string\addfontfeature (s)~ ignored~ \msg_line_context:;~
+ it~ cannot~ be~ used~ with~ a~ font~ that~ wasn't~ selected~ by~ a~ fontspec~ command.\\
+ \\
+ The~ current~ font~ is~ "\use:c{font@name}".\\
+ \int_compare:nTF { \clist_count:n {#1} = 1 }
+ { The~ requested~ feature~ is~ "#1". }
+ { The~ requested~ features~ are~ "#1". }
+ }
+\msg_new:nnn {fontspec} {feature-option-overwrite}
+ {
+ Option~ '#2'~ of~ font~ feature~ '#1'~ overwritten.
+ }
+\msg_new:nnn {fontspec} {script-not-exist-latn}
+ {
+ Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'.\\
+ 'Latin'~ script~ used~ instead.
+ }
+\msg_new:nnn {fontspec} {script-not-exist}
+ {
+ Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'.
+ }
+\msg_new:nnn {fontspec} {aat-feature-not-exist}
+ {
+ '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~
+ for~ AAT~ font~ '\l_fontspec_fontname_tl'.
+ }
+\msg_new:nnn {fontspec} {aat-feature-not-exist-in-font}
+ {
+ AAT~ feature~ '\l_keys_key_tl=\l_keys_value_tl'~ (#1)~ not~ available~
+ in~ font~ '\l_fontspec_fontname_tl'.
+ }
+\msg_new:nnn {fontspec} {icu-feature-not-exist}
+ {
+ '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~
+ for~ OpenType~ font~ '\l_fontspec_fontname_tl'
+ }
+\msg_new:nnn {fontspec} {icu-feature-not-exist-in-font}
+ {
+ OpenType~ feature~ '\l_keys_key_tl=\l_keys_value_tl'~ (#1)~ not~ available~
+ for~ font~ '\l_fontspec_fontname_tl'~
+ with~ script~ '\l__fontspec_script_name_tl'~ and~ language~ '\l__fontspec_lang_name_tl'.
+ }
+\msg_new:nnn {fontspec} {no-opticals}
+ {
+ '\l_fontspec_fontname_tl'~ doesn't~ appear~ to~ have~ an~ Optical~ Size~ axis.
+ }
+\msg_new:nnn {fontspec} {language-not-exist}
+ {
+ Language~ '#1'~ not~ available~
+ for~ font~ '\l_fontspec_fontname_tl'~
+ with~ script~ '\l__fontspec_script_name_tl'.\\
+ 'Default'~ language~ used~ instead.
+ }
+\msg_new:nnn {fontspec} {only-xetex-feature}
+ {
+ Ignored~ XeTeX~ only~ feature:~ '#1'.
+ }
+\msg_new:nnn {fontspec} {only-luatex-feature}
+ {
+ Ignored~ LuaTeX~ only~ feature:~ '#1'.
+ }
+\msg_new:nnn {fontspec} {no-mapping}
+ {
+ Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX.
+ }
+\msg_new:nnn {fontspec} {no-mapping-ligtex}
+ {
+ Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX.\\
+ Use~ "Ligatures=TeX"~ instead~ of~ "Mapping=tex-text".
+ }
+\msg_new:nnn {fontspec} {cm-default-obsolete}
+ {
+ The~ "cm-default"~ package~ option~ is~ obsolete.
+ }
+\msg_new:nnn {fontspec} {fakebold-only-xetex}
+ {
+ The~ "FakeBold"~ and~ "AutoFakeBold"~ options~ are~ only~ available~ with~ XeLaTeX.\\
+ Option~ ignored.
+ }
+\msg_new:nnn {fontspec} {defining-font}
+ {
+ Font~ family~'\l_fontspec_family_tl'~ created~ for~ font~ '#2'~
+ with~ options~ [\l__fontspec_all_features_clist].\\
+ \\
+ This~ font~ family~ consists~ of~ the~ following~ NFSS~ series/shapes:\\
+ \l_fontspec_defined_shapes_tl
+ }
+\msg_new:nnn {fontspec} {no-font-shape}
+ {
+ Could~ not~ resolve~ font~ #1~ (it~ probably~ doesn't~ exist).
+ }
+\msg_new:nnn {fontspec} {set-scale}
+ {
+ \l_fontspec_fontname_tl\space scale ~=~ \l__fontspec_scale_tl.
+ }
+\msg_new:nnn {fontspec} {setup-math}
+ {
+ Adjusting~ the~ maths~ setup~ (use~ [no-math]~ to~ avoid~ this).
+ }
+\msg_new:nnn {fontspec} {no-scripts}
+ {
+ Font~ \l_fontspec_fontname_tl\space does~ not~ contain~ any~ OpenType~ `Script'~ information.
+ }
+\msg_new:nnn {fontspec} {opa-twice}
+ {
+ Opacity~ set~ twice,~ in~ both~ Colour~ and~ Opacity.\\
+ Using~ specification~ "Opacity=#1".
+ }
+\msg_new:nnn {fontspec} {opa-twice-col}
+ {
+ Opacity~ set~ twice,~ in~ both~ Opacity~ and~ Colour.\\
+ Using~ an~ opacity~ specification~ in~ hex~ of~ "#1/FF".
+ }
+\msg_new:nnn {fontspec} {bad-colour}
+ {
+ Bad~ colour~ declaration~ "#1".~
+ Colour~ must~ be~ one~ of:\\
+ *~ a~ named~ xcolor~ colour\\
+ *~ a~ six-digit~ hex~ colour~ RRGGBB\\
+ *~ an~ eight-digit~ hex~ colour~ RRGGBBTT~ with~ opacity
+ }
+\DeclareOption{cm-default}
+ { \__fontspec_warning:n {cm-default-obsolete} }
+\DeclareOption{math}{\bool_set_true:N \g__fontspec_math_bool}
+\DeclareOption{no-math}{\bool_set_false:N \g__fontspec_math_bool}
+\DeclareOption{config}{\bool_set_true:N \g__fontspec_cfg_bool}
+\DeclareOption{no-config}{\bool_set_false:N \g__fontspec_cfg_bool}
+\DeclareOption{euenc}{\bool_set_true:N \g__fontspec_euenc_bool}
+\DeclareOption{tuenc}{\bool_set_false:N \g__fontspec_euenc_bool}
+\DeclareOption{quiet}
+ {
+ \msg_redirect_module:nnn { fontspec } { warning } { info }
+ \msg_redirect_module:nnn { fontspec } { info } { none }
+ }
+\DeclareOption{silent}
+ {
+ \msg_redirect_module:nnn { fontspec } { warning } { none }
+ \msg_redirect_module:nnn { fontspec } { info } { none }
+ }
+\ExecuteOptions{config,math,euenc}
+\ProcessOptions*
+\tl_set:Nn \g_fontspec_encoding_tl {TU}
+\file_if_exist:nF {tuenc.def} { \bool_set_true:N \g__fontspec_euenc_bool }
+\bool_if:NT \g__fontspec_euenc_bool
+ {
+ \tl_set:Nn \g_fontspec_encoding_tl {EU1}
+ }
\tl_set:Nn \rmdefault {lmr}
\tl_set:Nn \sfdefault {lmss}
\tl_set:Nn \ttdefault {lmtt}
\RequirePackage[\g_fontspec_encoding_tl]{fontenc}
-\tl_set_eq:NN \UTFencname \g_fontspec_encoding_tl % for xunicode
+\tl_set_eq:NN \UTFencname \g_fontspec_encoding_tl % for xunicode if needed
+\normalsize % to overcome the encoding changing the current font size
\tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
\tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
\AtBeginDocument
@@ -31,7 +298,51 @@
\tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
\tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
}
-\RequirePackage{xunicode}
+\bool_if:NT \g__fontspec_euenc_bool
+ {
+ \RequirePackage{xunicode}
+ }
+
+\cs_set:Nn \__fontspec_fontwrap:n { "#1" }
+\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
+ {
+ \font #1 = #2 ~at~ #3 \scan_stop:
+ }
+
+\cs_set:Npn \__fontspec_primitive_font_gset:Nnn #1#2#3
+ {
+ \global \font #1 = #2 ~at~ #3 \scan_stop:
+ }
+
+\cs_set:Npn \__fontspec_font_suppress_not_found_error:
+ {
+ \int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
+ }
+
+\prg_set_conditional:Nnn \__fontspec_font_if_null:N {p,TF,T,F}
+ {
+ \ifx #1 \nullfont
+ \prg_return_true:
+ \else
+ \prg_return_false:
+ \fi
+ }
+\cs_new:Nn \__fontspec_font_set:Nnn
+ {
+ \__fontspec_primitive_font_set:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
+ }
+\cs_new:Nn \__fontspec_font_gset:Nnn
+ {
+ \__fontspec_primitive_font_gset:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
+ }
+\prg_new_conditional:Nnn \font_glyph_if_exist:Nn {p,TF,T,F}
+ {
+ \etex_iffontchar:D #1 #2 \scan_stop:
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
\cs_new:Nn \__fontspec_pass_args:nnn
{
\IfNoValueTF {#2}
@@ -45,8 +356,8 @@
\cs_new:Nn \__fontspec_fontspec:nn
{
- \fontencoding {\g_fontspec_encoding_tl}
- \fontspec_set_family:Nnn \f@family {#1}{#2}
+ \fontspec_set_family:Nnn \f@family {#1} {#2}
+ \fontencoding { \l__fontspec_nfss_enc_tl }
\selectfont
\ignorespaces
}
@@ -132,8 +443,9 @@
{
\exp_not:N \DeclareRobustCommand \exp_not:N #1
{
- \exp_not:N \fontencoding {\g_fontspec_encoding_tl}
- \exp_not:N \fontfamily { \use:c {g__fontspec_ \cs_to_str:N #1 _family} } \exp_not:N \selectfont
+ \exp_not:N \fontfamily { \use:c {g__fontspec_ \cs_to_str:N #1 _family} }
+ \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
+ \exp_not:N \selectfont
}
}
}
@@ -184,7 +496,13 @@
{
\tl_set:Nx #1 {#2}
\clist_map_inline:Nn \l__fontspec_extensions_clist
- { \tl_remove_once:Nn #1 {##1} }
+ {
+ \tl_if_in:NnT #1 {##1}
+ {
+ \tl_remove_once:Nn #1 {##1}
+ \clist_map_break:
+ }
+ }
}
\bool_new:N \l__fontspec_disable_defaults_bool
\DeclareDocumentCommand \addfontfeatures {m}
@@ -192,6 +510,7 @@
\fontspec_if_fontspec_font:TF
{
\group_begin:
+ \keys_set_known:nnN {fontspec-addfeatures} {#1} \l__fontspec_tmp_tl
\prop_get:cnN {g__fontspec_ \f@family _prop} {options} \l__fontspec_options_tl
\prop_get:cnN {g__fontspec_ \f@family _prop} {fontname} \l__fontspec_fontname_tl
\bool_set_true:N \l__fontspec_disable_defaults_bool
@@ -204,7 +523,7 @@
\fontfamily\l_fontspec_family_tl\selectfont
}
{
- \__fontspec_warning:n {addfontfeatures-ignored}
+ \__fontspec_warning:nx {addfontfeatures-ignored} {#1}
}
\ignorespaces
}
@@ -268,48 +587,10 @@
\DeclareDocumentCommand \newfontscript {mm}
{
\fontspec_new_script:nn {#1} {#2}
- \fontspec_new_script:nn {#2} {#2}
- }
-\keys_define:nn { fontspec } { Script .choice: }
-\cs_new:Nn \fontspec_new_script:nn
- {
- \keys_define:nn { fontspec } { Script / #1 .code:n =
- \fontspec_check_script:nTF {#2}
- {
- \tl_set:Nn \l_fontspec_script_tl {#2}
- \int_set:Nn \l_fontspec_script_int {\l_fontspec_strnum_int}
- }
- {
- \fontspec_check_script:nTF {latn}
- {
- \__fontspec_warning:nx {script-not-exist-latn} {#1}
- \keys_set:nn {fontspec} {Script=Latin}
- }
- {
- \__fontspec_warning:nx {script-not-exist} {#1}
- }
- }
- }
}
\DeclareDocumentCommand \newfontlanguage {mm}
{
\fontspec_new_lang:nn {#1} {#2}
- \fontspec_new_lang:nn {#2} {#2}
- }
-\keys_define:nn { fontspec } { Language .choice: }
-\cs_new:Nn \fontspec_new_lang:nn
- {
- \keys_define:nn { fontspec } { Language / #1 .code:n =
- \fontspec_check_lang:nTF {#2}
- {
- \tl_set:Nn \l_fontspec_lang_tl {#2}
- \int_set:Nn \l_fontspec_language_int {\l_fontspec_strnum_int}
- }
- {
- \__fontspec_warning:nx {language-not-exist} {#1}
- \keys_set:nn { fontspec } { Language = Default }
- }
- }
}
\DeclareDocumentCommand \DeclareFontsExtensions {m}
{
@@ -317,6 +598,7 @@
\tl_remove_all:Nn \l__fontspec_extensions_clist {~}
}
\DeclareFontsExtensions{.otf,.ttf,.OTF,.TTF,.ttc,.TTC,.dfont}
+
\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
{
\cs_if_exist:cTF {g__fontspec_ \f@family _prop} \prg_return_true: \prg_return_false:
@@ -497,46 +779,6 @@
\tl_set_eq:NN #1 \l_fontspec_font
\tl_set_eq:NN #2 \l_fontspec_family_tl
}
-\cs_set:Nn \__fontspec_fontwrap:n { "#1" }
-\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
- {
- \font #1 = #2 ~at~ #3 \scan_stop:
- }
-
-\cs_set:Npn \__fontspec_primitive_font_gset:Nnn #1#2#3
- {
- \global \font #1 = #2 ~at~ #3 \scan_stop:
- }
-
-\cs_set:Npn \__fontspec_font_suppress_not_found_error:
- {
- \int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
- }
-
-\prg_set_conditional:Nnn \__fontspec_font_if_null:N {p,TF,T,F}
- {
- \ifx #1 \nullfont
- \prg_return_true:
- \else
- \prg_return_false:
- \fi
- }
-\cs_new:Nn \__fontspec_font_set:Nnn
- {
- \__fontspec_primitive_font_set:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
- }
-\cs_new:Nn \__fontspec_font_gset:Nnn
- {
- \__fontspec_primitive_font_gset:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
- }
-\prg_new_conditional:Nnn \font_glyph_if_exist:Nn {p,TF,T,F}
- {
- \etex_iffontchar:D #1 #2 \scan_stop:
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
\cs_set:Nn \fontspec_select:nn
{
\group_begin:
@@ -560,7 +802,7 @@
{
\__fontspec_save_fontinfo:
\__fontspec_find_autofonts:
- \DeclareFontFamily{\g_fontspec_encoding_tl}{\l_fontspec_family_tl}{}
+ \DeclareFontFamily{\l__fontspec_nfss_enc_tl}{\l_fontspec_family_tl}{}
\__fontspec_set_faces:
\__fontspec_info:nxx {defining-font} {#1} {#2}
}
@@ -738,12 +980,12 @@
}
\cs_new:Nn \__fontspec_set_faces:
{
- \__fontspec_add_nfssfont:oooo \mddefault \updefault \l_fontspec_fontname_tl \l__fontspec_fontfeat_up_clist
- \__fontspec_add_nfssfont:oooo \bfdefault \updefault \l_fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
- \__fontspec_add_nfssfont:oooo \mddefault \itdefault \l_fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
- \__fontspec_add_nfssfont:oooo \mddefault \sldefault \l_fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
- \__fontspec_add_nfssfont:oooo \bfdefault \itdefault \l_fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
- \__fontspec_add_nfssfont:oooo \bfdefault \sldefault \l_fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \updefault \l_fontspec_fontname_tl \l__fontspec_fontfeat_up_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \updefault \l_fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \itdefault \l_fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \sldefault \l_fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \itdefault \l_fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \sldefault \l_fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
\prop_map_inline:Nn \l__fontspec_nfssfont_prop { \__fontspec_set_faces_aux:nnnnn ##2 }
}
@@ -865,9 +1107,10 @@
}
- \__fontspec_declare_shapes_normal:nn {#1} {#2}
- \__fontspec_declare_shape_slanted:nn {#1} {#2}
- \__fontspec_declare_shape_loginfo:nnn {#1} {#2} {#3}
+ \__fontspec_declare_shapes_normal:nn {#1} {#2}
+ \__fontspec_declare_shapes_smcaps:nn {#1} {#2}
+ \__fontspec_declare_shape_slanted:nn {#1} {#2}
+ \__fontspec_declare_shape_loginfo:nn {#1} {#2}
}
\cs_generate_variant:Nn \__fontspec_declare_shape:nnnn {nnxx}
@@ -888,18 +1131,25 @@
}
\cs_new:Nn \__fontspec_declare_shapes_normal:nn
- {
- \__fontspec_DeclareFontShape:xxxxxx {\g_fontspec_encoding_tl} {\l_fontspec_family_tl}
+ {
+ \__fontspec_DeclareFontShape:xxxxxx {\l__fontspec_nfss_enc_tl} {\l_fontspec_family_tl}
{#1} {#2} {\l__fontspec_nfss_tl}{\l__fontspec_postadjust_tl}
+ }
+\cs_new:Nn \__fontspec_declare_shapes_smcaps:nn
+ {
\bool_if:NF \l__fontspec_nosc_bool
{
- \__fontspec_DeclareFontShape:xxxxxx {\g_fontspec_encoding_tl} {\l_fontspec_family_tl}
- {#1}
- {\str_if_eq_x:nnTF {#2} {\itdefault} \sidefault \scdefault}
- {\l__fontspec_nfss_sc_tl}{\l__fontspec_postadjust_tl}
+ \__fontspec_DeclareFontShape:xxxxxx {\l__fontspec_nfss_enc_tl} {\l_fontspec_family_tl} {#1}
+ { \__fontspec_combo_sc_shape:n {#2} } {\l__fontspec_nfss_sc_tl} {\l__fontspec_postadjust_tl}
}
- }
+ }
+\cs_new:Nn \__fontspec_combo_sc_shape:n
+ {
+ \tl_if_exist:cTF { \__fontspec_shape_merge:nn {#1} {\scdefault} }
+ { \tl_use:c { \__fontspec_shape_merge:nn {#1} {\scdefault} } }
+ { \scdefault }
+ }
\cs_new:Nn \__fontspec_DeclareFontShape:nnnnnn
{
@@ -918,40 +1168,44 @@
!(\str_if_eq_x_p:nn {\itdefault} {\sldefault})
}
{
- \__fontspec_DeclareFontShape:xxxxxx {\g_fontspec_encoding_tl}{\l_fontspec_family_tl}{#1}{\sldefault}
+ \__fontspec_DeclareFontShape:xxxxxx {\l__fontspec_nfss_enc_tl}{\l_fontspec_family_tl}{#1}{\sldefault}
{<->ssub*\l_fontspec_family_tl/#1/\itdefault}{\l__fontspec_postadjust_tl}
}
}
-\cs_new:Nn \__fontspec_declare_shape_loginfo:nnn
+\cs_new:Nn \__fontspec_declare_shape_loginfo:nn
{
\tl_gput_right:Nx \l_fontspec_defined_shapes_tl
{
- \exp_not:n { \\ \\ }
- *~ '\exp_not:N \str_case:nnF {#1/#2}
+ -~ \exp_not:N \str_case:nn {#1/#2}
{
- {\mddefault/\updefault} {normal}
- {\bfdefault/\updefault} {bold}
- {\mddefault/\itdefault} {italic}
- {\bfdefault/\itdefault} {bold~ italic}
- } {#2/#3}'~
- with~ NFSS~ spec.: \exp_not:N \\
+ {\mddefault/\updefault} {'normal'~}
+ {\bfdefault/\updefault} {'bold'~}
+ {\mddefault/\itdefault} {'italic'~}
+ {\mddefault/\sldefault} {'slanted'~}
+ {\bfdefault/\itdefault} {'bold~ italic'~}
+ {\bfdefault/\sldefault} {'bold~ slanted'~}
+ } (#1/#2)~
+ with~ NFSS~ spec.:~
\l__fontspec_nfss_tl
- \exp_not:n { \\ \\ }
- *~ '\exp_not:N \str_case:nnF {#1/\scdefault}
+ \exp_not:n { \\ }
+ -~ \exp_not:N \str_case:nn { #1 / \__fontspec_combo_sc_shape:n {#2} }
{
- {\mddefault/\scdefault} {small~ caps}
- {\bfdefault/\scdefault} {bold~ small~ caps}
- {\mddefault/\sidefault} {italic~ small~ caps}
- {\bfdefault/\sidefault} {bold~ italic~ small~ caps}
- } {#2/#3}'~
- with~ NFSS~ spec.: \exp_not:N \\
+ {\mddefault/\scdefault} {'small~ caps'~}
+ {\bfdefault/\scdefault} {'bold~ small~ caps'~}
+ {\mddefault/\itscdefault} {'italic~ small~ caps'~}
+ {\bfdefault/\itscdefault} {'bold~ italic~ small~ caps'~}
+ {\mddefault/\slscdefault} {'slanted~ small~ caps'~}
+ {\bfdefault/\slscdefault} {'bold~ slanted~ small~ caps'~}
+ }~( #1 / \__fontspec_combo_sc_shape:n {#2} )~
+ with~ NFSS~ spec.:~
\l__fontspec_nfss_sc_tl
- \tl_if_empty:NF \l__fontspec_postadjust_tl
+ \tl_if_empty:fF {\l__fontspec_postadjust_tl}
{
\exp_not:N \\ and~ font~ adjustment~ code: \exp_not:N \\ \l__fontspec_postadjust_tl
}
}
}
+\cs_generate_variant:Nn \tl_if_empty:nF {f}
\clist_set:Nn \l__fontspec_pre_feat_sclist
{
\bool_if:NT \l__fontspec_ot_bool
@@ -1020,6 +1274,7 @@
\tl_clear:N \l_fontspec_renderer_tl
\tl_clear:N \l_fontspec_defined_shapes_tl
\tl_clear:N \g__fontspec_curr_series_tl
+ \tl_gset_eq:NN \l__fontspec_nfss_enc_tl \g_fontspec_encoding_tl
% This is for detecting font families when assigning default features.
% Replace defaults for the standard families because they're not set in the usual way:
@@ -1178,17 +1433,17 @@
\fontspec_iv_str_to_num:Nn \l_fontspec_strnum_int {#1}
\int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts \l_fontspec_font }
\int_zero:N \l_tmpa_int
- \@tempswafalse
+ \bool_set_false:N \l__fontspec_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
\ifnum \XeTeXOTscripttag\l_fontspec_font \l_tmpa_int = \l_fontspec_strnum_int
- \@tempswatrue
+ \bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
\int_incr:N \l_tmpa_int
\fi
}
- \if@tempswa \prg_return_true: \else: \prg_return_false: \fi:
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
\prg_new_conditional:Nnn \fontspec_check_lang:n {TF}
{
@@ -1196,17 +1451,17 @@
\int_set:Nn \l_tmpb_int
{ \XeTeXOTcountlanguages \l_fontspec_font \l_fontspec_script_int }
\int_zero:N \l_tmpa_int
- \@tempswafalse
+ \bool_set_false:N \l__fontspec_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
\ifnum\XeTeXOTlanguagetag\l_fontspec_font\l_fontspec_script_int \l_tmpa_int =\l_fontspec_strnum_int
- \@tempswatrue
+ \bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
\int_incr:N \l_tmpa_int
\fi
}
- \if@tempswa \prg_return_true: \else: \prg_return_false: \fi:
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
\prg_new_conditional:Nnn \fontspec_check_ot_feat:n {TF,T}
{
@@ -1218,23 +1473,29 @@
}
\fontspec_v_str_to_num:Nn \l_fontspec_strnum_int {#1}
\int_zero:N \l_tmpa_int
- \@tempswafalse
+ \bool_set_false:N \l__fontspec_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
\ifnum\XeTeXOTfeaturetag\l_fontspec_font\l_fontspec_script_int\l_fontspec_language_int
\l_tmpa_int =\l_fontspec_strnum_int
- \@tempswatrue
+ \bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
\int_incr:N \l_tmpa_int
\fi
}
- \if@tempswa \prg_return_true: \else: \prg_return_false: \fi:
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
+
\cs_new:Nn \__fontspec_keys_define_code:nnn
{
\keys_define:nn {#1} { #2 .code:n = {#3} }
}
+\cs_new:Nn \__fontspec_aff_error:n
+ {
+ \__fontspec_keys_define_code:nnn {fontspec-addfeatures} {#1}
+ { \__fontspec_error:nx {not-in-addfontfeatures} {#1} }
+ }
\bool_new:N \l__fontspec_external_bool
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {ExternalLocation}
{
@@ -1428,6 +1689,10 @@
{
\fontspec_complete_fontname:Nn \l__fontspec_sizedfont_tl {#1}
}
+\__fontspec_keys_define_code:nnn {fontspec-preparse} {NFSSEncoding}
+ {
+ \tl_gset:Nx \l__fontspec_nfss_enc_tl { #1 }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {NFSSFamily}
{
\tl_set:Nx \l__fontspec_nfss_fam_tl { #1 }
@@ -1450,7 +1715,7 @@
}
}
- \__fontspec_add_nfssfont:oooo
+ \__fontspec_add_nfssfont:nnnn
{\use_i:nnn #1}{\use_ii:nnn #1}{\l__fontspec_this_font_tl}{\l__fontspec_this_feat_tl}
}
\cs_new:Nn \__fontspec_add_nfssfont:nnnn
@@ -1467,8 +1732,6 @@
{ {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
}
}
-\cs_generate_variant:Nn \__fontspec_add_nfssfont:nnnn {ooo}
-\cs_generate_variant:Nn \__fontspec_add_nfssfont:nnnn {oooo}
\__fontspec_keys_define_code:nnn {fontspec} {Scale}
{
\str_case:nnF {#1}
@@ -1514,6 +1777,7 @@
\bool_if:NF \l__fontspec_firsttime_bool
{ \_fontspec_parse_wordspace:w #1,,,\q_stop }
}
+\__fontspec_aff_error:n {WordSpace}
\cs_set:Npn \_fontspec_parse_wordspace:w #1,#2,#3,#4 \q_stop
{
\tl_if_empty:nTF {#4}
@@ -1554,6 +1818,7 @@
{ \fontdimen 7 \font = #1 \fontdimen 7 \font }
}
}
+\__fontspec_aff_error:n {PunctuationSpace}
\__fontspec_keys_define_code:nnn {fontspec} {FontAdjustment}
{
\tl_put_right:Nx \l__fontspec_postadjust_tl {#1}
@@ -1564,6 +1829,9 @@
}
\__fontspec_keys_define_code:nnn {fontspec} {HyphenChar}
{
+ \bool_if:NT \l__fontspec_addfontfeatures_bool
+ { \__fontspec_error:nx {not-in-addfontfeatures} {HyphenChar} }
+
\str_if_eq:nnTF {#1} {None}
{
\tl_put_right:Nn \l__fontspec_postadjust_tl
@@ -1581,6 +1849,7 @@
{ \__fontspec_error:nx {no-glyph}{#1} }
}
}
+\__fontspec_aff_error:n {HyphenChar}
\__fontspec_keys_define_code:nnn {fontspec} {Color}
{
\cs_if_exist:cTF { \token_to_str:N \color@ #1 }
@@ -1624,7 +1893,7 @@
\tl_set:Nx \l__fontspec_opacity_tl
{
\int_compare:nT { \l__fontspec_tmp_int <= "F } {0} % zero pad
- \int_to_hexadecimal:n { \l__fontspec_tmp_int }
+ \int_to_hex:n { \l__fontspec_tmp_int }
}
}
\__fontspec_keys_define_code:nnn {fontspec} {Mapping}
@@ -1939,8 +2208,34 @@
}
}
}
+\keys_define:nn { fontspec } { Script .choice: }
+\cs_new:Nn \fontspec_new_script:nn
+ {
+ \keys_define:nn { fontspec } { Script / #1 .code:n =
+ \clist_map_inline:nn {#2}
+ {
+ \fontspec_check_script:nTF {####1}
+ {
+ \tl_set:Nn \l_fontspec_script_tl {####1}
+ \int_set:Nn \l_fontspec_script_int {\l_fontspec_strnum_int}
+ \clist_map_break:
+ }
+ {
+ \fontspec_check_script:nTF {latn}
+ {
+ \__fontspec_warning:nx {script-not-exist-latn} {#1}
+ \keys_set:nn {fontspec} {Script=Latin}
+ }
+ {
+ \__fontspec_warning:nx {script-not-exist} {#1}
+ }
+ }
+ }
+ }
+ }
\newfontscript{Arabic}{arab} \newfontscript{Armenian}{armn}
-\newfontscript{Balinese}{bali} \newfontscript{Bengali}{beng}
+\newfontscript{Balinese}{bali}
+\newfontscript{Bengali}{bng2,beng}
\newfontscript{Bopomofo}{bopo} \newfontscript{Braille}{brai}
\newfontscript{Buginese}{bugi} \newfontscript{Buhid}{buhd}
\newfontscript{Byzantine~Music}{byzm}
@@ -1949,24 +2244,29 @@
\newfontscript{CJK~Ideographic}{hani} \newfontscript{Coptic}{copt}
\newfontscript{Cypriot~Syllabary}{cprt} \newfontscript{Cyrillic}{cyrl}
\newfontscript{Default}{DFLT} \newfontscript{Deseret}{dsrt}
-\newfontscript{Devanagari}{deva} \newfontscript{Ethiopic}{ethi}
+\newfontscript{Devanagari}{dev2,deva}
+\newfontscript{Ethiopic}{ethi}
\newfontscript{Georgian}{geor} \newfontscript{Glagolitic}{glag}
\newfontscript{Gothic}{goth} \newfontscript{Greek}{grek}
-\newfontscript{Gujarati}{gujr} \newfontscript{Gurmukhi}{guru}
+\newfontscript{Gujarati}{gjr2,gujr}
+\newfontscript{Gurmukhi}{gur2,guru}
\newfontscript{Hangul~Jamo}{jamo} \newfontscript{Hangul}{hang}
\newfontscript{Hanunoo}{hano} \newfontscript{Hebrew}{hebr}
\newfontscript{Hiragana~and~Katakana}{kana}
-\newfontscript{Javanese}{java} \newfontscript{Kannada}{knda}
+\newfontscript{Javanese}{java}
+\newfontscript{Kannada}{knd2,knda}
\newfontscript{Kharosthi}{khar} \newfontscript{Khmer}{khmr}
\newfontscript{Lao}{lao~} \newfontscript{Latin}{latn}
\newfontscript{Limbu}{limb} \newfontscript{Linear~B}{linb}
-\newfontscript{Malayalam}{mlym} \newfontscript{Math}{math}
+\newfontscript{Malayalam}{mlm2,mlym}
+\newfontscript{Math}{math}
\newfontscript{Mongolian}{mong}
\newfontscript{Musical~Symbols}{musc} \newfontscript{Myanmar}{mymr}
\newfontscript{N'ko}{nko~} \newfontscript{Ogham}{ogam}
\newfontscript{Old~Italic}{ital}
\newfontscript{Old~Persian~Cuneiform}{xpeo}
-\newfontscript{Oriya}{orya} \newfontscript{Osmanya}{osma}
+\newfontscript{Oriya}{ory2,orya}
+\newfontscript{Osmanya}{osma}
\newfontscript{Phags-pa}{phag} \newfontscript{Phoenician}{phnx}
\newfontscript{Runic}{runr} \newfontscript{Shavian}{shaw}
\newfontscript{Sinhala}{sinh}
@@ -1974,13 +2274,29 @@
\newfontscript{Syloti~Nagri}{sylo} \newfontscript{Syriac}{syrc}
\newfontscript{Tagalog}{tglg} \newfontscript{Tagbanwa}{tagb}
\newfontscript{Tai~Le}{tale} \newfontscript{Tai~Lu}{talu}
-\newfontscript{Tamil}{taml} \newfontscript{Telugu}{telu}
+\newfontscript{Tamil}{tml2,taml}
+\newfontscript{Telugu}{tel2,telu}
\newfontscript{Thaana}{thaa} \newfontscript{Thai}{thai}
\newfontscript{Tibetan}{tibt} \newfontscript{Tifinagh}{tfng}
\newfontscript{Ugaritic~Cuneiform}{ugar}\newfontscript{Yi}{yi~~}
\newfontscript{Kana}{kana}
\newfontscript{Maths}{math}
\newfontscript{CJK}{hani}
+\keys_define:nn { fontspec } { Language .choice: }
+\cs_new:Nn \fontspec_new_lang:nn
+ {
+ \keys_define:nn { fontspec } { Language / #1 .code:n =
+ \fontspec_check_lang:nTF {#2}
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {#2}
+ \int_set:Nn \l_fontspec_language_int {\l_fontspec_strnum_int}
+ }
+ {
+ \__fontspec_warning:nx {language-not-exist} {#1}
+ \keys_set:nn { fontspec } { Language = Default }
+ }
+ }
+ }
\newfontlanguage{Abaza}{ABA}\newfontlanguage{Abkhazian}{ABK}
\newfontlanguage{Adyghe}{ADY}\newfontlanguage{Afrikaans}{AFK}
\newfontlanguage{Afar}{AFR}\newfontlanguage{Agaw}{AGW}
@@ -2207,43 +2523,6 @@
{
\__fontspec_update_featstr:n {#1}
}
-\providecommand*{\sidefault}{si}
-\DeclareRobustCommand{\sishape}
- {
- \not@math@alphabet\sishape\relax
- \fontshape\sidefault\selectfont
- }
-\DeclareTextFontCommand{\textsi}{\sishape}
-\cs_new:Nn \fontspec_blend_shape:nnn
- {
- \bool_if:nTF
- {
- \str_if_eq_x_p:nn {\f@shape} {#2} &&
- \cs_if_exist_p:c {\f@encoding/\f@family/\f@series/#3}
- }
- { \fontshape{#3}\selectfont }
- { \fontshape{#1}\selectfont }
- }
-\DeclareRobustCommand \itshape
- {
- \not@math@alphabet\itshape\mathit
- \fontspec_blend_shape:nnn\itdefault\scdefault\sidefault
- }
-\DeclareRobustCommand \slshape
- {
- \not@math@alphabet\slshape\relax
- \fontspec_blend_shape:nnn\sldefault\scdefault\sidefault
- }
-\DeclareRobustCommand \scshape
- {
- \not@math@alphabet\scshape\relax
- \fontspec_blend_shape:nnn\scdefault\itdefault\sidefault
- }
-\DeclareRobustCommand \upshape
- {
- \not@math@alphabet\upshape\relax
- \fontspec_blend_shape:nnn\updefault\sidefault\scdefault
- }
\@ifpackageloaded{euler}
{
\bool_set_true:N \g__fontspec_pkg_euler_loaded_bool
@@ -2346,7 +2625,7 @@
{
\ifx\define@antt@mathversions a\bool_set_false:N \g__fontspec_math_bool\fi
}{}
- \@ifpackageloaded{arev}{\bool_set_false:N \g__fontspec_math_bool}{}
+ \@ifpackageloaded{arevmath}{\bool_set_false:N \g__fontspec_math_bool}{}
\@ifpackageloaded{eulervm}{\bool_set_false:N \g__fontspec_math_bool}{}
\@ifpackageloaded{mathdesign}{\bool_set_false:N \g__fontspec_math_bool}{}
\@ifpackageloaded{concmath}{\bool_set_false:N \g__fontspec_math_bool}{}
@@ -2379,39 +2658,201 @@
}
}
\AtBeginDocument{\fontspec_maybe_setup_maths:}
+\tl_set:Nn \zf@enc { \g_fontspec_encoding_tl }
+\cs_set:Npn \zf@fontspec #1 #2
+ {
+ \fontspec_select:nn {#1} {#2}
+ \tl_set:Nn \zf@family { \l_fontspec_family_tl }
+ \tl_set:Nn \zf@basefont { \l_fontspec_font }
+ }
\bool_if:NT \g__fontspec_cfg_bool
{
\InputIfFileExists{fontspec.cfg}
{}
{\typeout{No~ fontspec.cfg~ file~ found;~ no~ configuration~ loaded.}}
}
-\tl_set:Nn \zf@enc { \g_fontspec_encoding_tl }
-\cs_set:Npn \zf@fontspec #1 #2
+\providecommand*\itscdefault{\itdefault\scdefault}
+\providecommand*\slscdefault{\sldefault\scdefault}
+\DeclareRobustCommand{\sishape}
{
- \fontspec_select:nn {#1} {#2}
- \tl_set:Nn \zf@family { \l_fontspec_family_tl }
- \tl_set:Nn \zf@basefont { \l_fontspec_font }
+ \not@math@alphabet\sishape\relax
+ \fontshape{\itscdefault}\selectfont
}
-\ExplSyntaxOff
-%%
-%% Copyright 2004--2015 Will Robertson <wspr81@gmail.com>
+\DeclareTextFontCommand{\textsi}{\sishape}
+\cs_new:Nn \__fontspec_shape_merge:nn { c__fontspec_shape_#1_#2_tl }
+\tl_const:cn { \__fontspec_shape_merge:nn \itdefault \scdefault } {\itscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \sldefault \scdefault } {\slscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \scdefault \itdefault } {\itscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \scdefault \sldefault } {\slscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \slscdefault \itdefault } {\itscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \itscdefault \sldefault } {\slscdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \itscdefault \updefault } {\scdefault}
+\tl_const:cn { \__fontspec_shape_merge:nn \slscdefault \updefault } {\scdefault}
+\cs_new:Nn \fontspec_merge_shape:n
+ {
+ \bool_if:nTF
+ {
+ \tl_if_exist_p:c { \__fontspec_shape_merge:nn {\f@shape} {#1} } &&
+ \cs_if_exist_p:c
+ {
+ \f@encoding/\f@family/\f@series/
+ \tl_use:c { \__fontspec_shape_merge:nn {\f@shape} {#1} }
+ }
+ }
+ { \fontshape { \tl_use:c { \__fontspec_shape_merge:nn {\f@shape} {#1} } } \selectfont }
+ { \fontshape {#1} \selectfont }
+ }
+\DeclareRobustCommand \itshape
+ {
+ \not@math@alphabet\itshape\mathit
+ \fontspec_merge_shape:n\itdefault
+ }
+\DeclareRobustCommand \slshape
+ {
+ \not@math@alphabet\slshape\relax
+ \fontspec_merge_shape:n\sldefault
+ }
+\DeclareRobustCommand \scshape
+ {
+ \not@math@alphabet\scshape\relax
+ \fontspec_merge_shape:n\scdefault
+ }
+\DeclareRobustCommand \upshape
+ {
+ \not@math@alphabet\upshape\relax
+ \fontspec_merge_shape:n\updefault
+ }
+\int_new:N \l__fontspec_em_int
+\int_new:N \l__fontspec_emdef_int
+\cs_new_protected:Npn \emfontdeclare #1
+ {
+ \int_zero:N \l__fontspec_emdef_int
+ \clist_map_inline:nn {#1}
+ {
+ \int_incr:N \l__fontspec_emdef_int
+ \cs_set:cpn {__fontspec_em_font_ \int_use:N \l__fontspec_emdef_int _switch:} {##1}
+ }
+ }
+\DeclareRobustCommand \em
+ {
+ \@nomath\em
+ \int_incr:N \l__fontspec_em_int
+ \use:c {__fontspec_em_font_ \int_use:N \l__fontspec_em_int _switch:}
+ }
+\DeclareTextFontCommand{\emph}{\em}
+\cs_set:Npn \emshape { \itshape }
+\cs_set:Npn \eminnershape { \upshape }
+\emfontdeclare{ \emshape, \eminnershape }
+\DeclareRobustCommand{\-}
+ {
+ \discretionary
+ {
+ \char\ifnum\hyphenchar\font<\z@
+ \xlx@defaulthyphenchar
+ \else
+ \hyphenchar\font
+ \fi
+ }{}{}
+ }
+\def\xlx@defaulthyphenchar{`\-}
+\cs_new:Nn \fontspec_visible_space:
+ {
+ \font_glyph_if_exist:NnTF \font {"2423}
+ { \char"2423\scan_stop: }
+ { \fontspec_visible_space_fallback: }
+ }
+\cs_new:Nn \fontspec_visible_space_fallback:
+ {
+ {
+ \usefont{\g_fontspec_encoding_tl}{lmtt}{\f@series}{\f@shape}
+ \textvisiblespace
+ }
+ }
+\group_begin:
+\char_set_catcode_active:n{"20}%
+\cs_gset:Npn\fontspec_print_visible_spaces:{%
+\char_set_catcode_active:n{"20}%
+\cs_set_eq:NN^^20\fontspec_visible_space:%
+}%
+\group_end:
+\def\verb
+ {
+ \relax\ifmmode\hbox\else\leavevmode\null\fi
+ \bgroup
+ \verb@eol@error \let\do\@makeother \dospecials
+ \verbatim@font\@noligs
+ \@ifstar\__fontspecsverb\@verb
+ }
+\def\__fontspecsverb{\fontspec_print_visible_spaces:\@sverb}
+\AtBeginDocument
+ {
+ \fontspec_patch_verbatim:
+ \fontspec_patch_moreverb:
+ \fontspec_patch_fancyvrb:
+ \fontspec_patch_listings:
+ }
+\cs_set:Npn \fontspec_patch_verbatim:
+ {
+ \@ifpackageloaded{verbatim}
+ {
+ \cs_set:cpn {verbatim*}
+ {
+ \group_begin: \@verbatim \fontspec_print_visible_spaces: \verbatim@start
+ }
+ }
+ {
+ \cs_set:cpn {verbatim*}
+ {
+ \@verbatim \fontspec_print_visible_spaces: \@sxverbatim
+ }
+ }
+ }
+\cs_set:Npn \fontspec_patch_moreverb:
+ {
+ \@ifpackageloaded{moreverb}{
+ \cs_set:cpn {listingcont*}
+ {
+ \cs_set:Npn \verbatim@processline
+ {
+ \thelisting@line \global\advance\listing@line\c_one
+ \the\verbatim@line\par
+ }
+ \@verbatim \fontspec_print_visible_spaces: \verbatim@start
+ }
+ }{}
+ }
+\cs_set:Npn \fontspec_patch_fancyvrb:
+ {
+ \@ifpackageloaded{fancyvrb}
+ {
+ \cs_set_eq:NN \FancyVerbSpace \fontspec_visible_space:
+ }{}
+ }
+\cs_set:Npn \fontspec_patch_listings:
+ {
+ \@ifpackageloaded{listings}
+ {
+ \cs_set_eq:NN \lst@visiblespace \fontspec_visible_space:
+ }{}
+ }
+\RenewDocumentCommand \oldstylenums {m}
+ {
+ { \addfontfeature{Numbers=OldStyle} #1 }
+ }
+\NewDocumentCommand \liningnums {m}
+ {
+ { \addfontfeature{Numbers=Lining} #1 }
+ }
+%% ------------------------------------------------
+%% Copyright 2004--2016 Will Robertson <wspr81@gmail.com>
%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
%%
-%% Distributable under the LaTeX Project Public License,
-%% version 1.3c or higher (your choice). The latest version of
-%% this license is at: http://www.latex-project.org/lppl.txt
+%% 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.
-%%
-%% This work consists of this file fontspec.dtx
-%% and the derived files fontspec.sty,
-%% fontspec.lua,
-%% fontspec.cfg,
-%% fontspec-xetex.sty,
-%% fontspec-luatex.sty,
-%% fontspec-patches.sty,
-%% fontspec-example.tex,
-%% and fontspec.pdf.
-%%
+%% It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec-example.tex.
+%% And the derived files: fontspec*.sty,fontspec.lua, and fontspec.pdf.
+%% ------------------------------------------------
%%
%% End of file `fontspec-xetex.sty'.
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg b/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg
deleted file mode 100644
index a028c587783..00000000000
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-\defaultfontfeatures
- [\rmfamily,\sffamily]
- {Ligatures=TeX}
-
-\defaultfontfeatures
- [\ttfamily]
- {WordSpace={1,0,0},
- PunctuationSpace=WordSpace}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% FOR BACKWARDS COMPATIBILITY WITH PREVIOUS VERSIONS %%%
-
-
-\aliasfontfeatureoption{Ligatures}{Historic}{Historical}
-\let\newfontinstance\newfontfamily
-
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
index f5c17fd02b5..ec0b8a171e2 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
@@ -4,48 +4,33 @@
--
-- The original source files were:
--
--- fontspec.dtx (with options: `lua')
---
--- _________________________________________
--- The fontspec package for XeLaTeX/LuaLaTeX
--- (C) 2004--2015 Will Robertson and Khaled Hosny
---
--- License information appended.
---
---
-
-
+-- fontspec-lua.dtx (with options: `lua')
+-- ------------------------------------------------
+-- The FONTSPEC package for XeLaTeX/LuaLaTeX
+-- (C) 2004--2016 Will Robertson and Khaled Hosny
+-- License information appended.
+-- ------------------------------------------------
fontspec = fontspec or {}
local fontspec = fontspec
fontspec.module = {
name = "fontspec",
- version = "2.3c",
- date = "2013/05/20",
+ version = "2.5",
+ date = "2016/01/30",
description = "Advanced font selection for LuaLaTeX.",
- author = "Khaled Hosny, Philipp Gesang",
- copyright = "Khaled Hosny, Philipp Gesang",
+ author = "Khaled Hosny, Philipp Gesang, Will Robertson",
+ copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",
license = "LPPL"
}
local err, warn, info, log = luatexbase.provides_module(fontspec.module)
-
-fontspec.log = log or (function (s) luatexbase.module_info("fontspec", s) end)
+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)
-
-if luatexbase.catcodetables == nil then
- latexpackage_catcodetable=luatexbase.registernumber("catcodetable@atletter")
-else
- latexpackage_catcodetable=luatexbase.catcodetables['latex-package']
-end
-function fontspec.sprint (...)
- tex.sprint(latexpackage_catcodetable, ...)
-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() fontspec.sprint([[\@tempswatrue]]) end
-local function tempswafalse() fontspec.sprint([[\@tempswafalse]]) end
+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
tempswatrue()
@@ -83,25 +68,16 @@ function fontspec.mathfontdimen(fnt, str)
fontspec.sprint("0pt")
end
end
---
--- Copyright 2004--2015 Will Robertson <wspr81@gmail.com>
+-- ------------------------------------------------
+-- Copyright 2004--2016 Will Robertson <wspr81@gmail.com>
-- Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
--
--- Distributable under the LaTeX Project Public License,
--- version 1.3c or higher (your choice). The latest version of
--- this license is at: http://www.latex-project.org/lppl.txt
+-- 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.
---
--- This work consists of this file fontspec.dtx
--- and the derived files fontspec.sty,
--- fontspec.lua,
--- fontspec.cfg,
--- fontspec-xetex.sty,
--- fontspec-luatex.sty,
--- fontspec-patches.sty,
--- fontspec-example.tex,
--- and fontspec.pdf.
---
+-- It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec-example.tex.
+-- And the derived files: fontspec*.sty,fontspec.lua, and fontspec.pdf.
+-- ------------------------------------------------
--
-- End of file `fontspec.lua'.
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
index 8f7489564a4..afa682999de 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
@@ -4,297 +4,42 @@
%%
%% The original source files were:
%%
-%% fontspec.dtx (with options: `fontspec')
-%%
-%% _________________________________________
-%% The fontspec package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2015 Will Robertson and Khaled Hosny
-%%
-%% License information appended.
-%%
-%%
-\ProvidesPackage{fontspec}
- [2015/09/24 v2.4e Font selection for XeLaTeX and LuaLaTeX]
-
-
-\RequirePackage{expl3}[2015/06/26]
+%% fontspec.dtx (with options: `fontspec,load')
+%% ------------------------------------------------
+%% The FONTSPEC package for XeLaTeX/LuaLaTeX
+%% (C) 2004--2016 Will Robertson and Khaled Hosny
+%% License information appended.
+%% ------------------------------------------------
+\RequirePackage{expl3}
\RequirePackage{xparse}
-\ExplSyntaxOn
-\cs_if_exist:NF \lua_now_x:n
- { \cs_set_eq:NN \lua_now_x:n \directlua }
+\ProvidesExplPackage{fontspec}%
+ {2016/01/30}{2.5}{Font selection for XeLaTeX and LuaLaTeX}
\msg_new:nnn {fontspec} {cannot-use-pdftex}
{
- The~ fontspec~ package~ requires~ either~ XeTeX~ or~ LuaTeX~ to~ function.
- \\\\
- You~ must~ change~ your~ typesetting~ engine~ to,~
- e.g.,~ "xelatex"~ or~ "lualatex"\\
- instead~ of~ plain~ "latex"~ or~ "pdflatex".
+ The~ fontspec~ package~ requires~ either~ XeTeX~ or~ LuaTeX~ to~ function.\\\\
+ You~ must~ change~ your~ typesetting~ engine~ to,~ e.g.,~ "xelatex"~ or~ "lualatex" instead~ of~ plain~ "latex"~ or~ "pdflatex".
}
-\xetex_if_engine:F
- {
- \luatex_if_engine:TF
- {
+\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")}
- }
- {
- \msg_fatal:nn {fontspec} {cannot-use-pdftex}
- }
- }
-\bool_new:N \l__fontspec_firsttime_bool
-\bool_new:N \l__fontspec_nobf_bool
-\bool_new:N \l__fontspec_noit_bool
-\bool_new:N \l__fontspec_nosc_bool
-\bool_new:N \l__fontspec_tfm_bool
-\bool_new:N \l__fontspec_atsui_bool
-\bool_new:N \l__fontspec_ot_bool
-\bool_new:N \l__fontspec_mm_bool
-\bool_new:N \l__fontspec_graphite_bool
-\bool_new:N \g__fontspec_math_euler_bool
-\bool_new:N \g__fontspec_math_lucida_bool
-\bool_new:N \g__fontspec_pkg_euler_loaded_bool
-\bool_new:N \g__fontspec_cfg_bool
-\bool_new:N \g__fontspec_math_bool
-\int_new:N \l_fontspec_script_int
-\int_new:N \l_fontspec_language_int
-\int_new:N \l_fontspec_strnum_int
-\fp_new:N \l__fontspec_tmpa_fp
-\fp_new:N \l__fontspec_tmpb_fp
-\dim_new:N \l__fontspec_tmpa_dim
-\dim_new:N \l__fontspec_tmpb_dim
-\dim_new:N \l__fontspec_tmpc_dim
-\tl_set:Nx \c_colon_str { \tl_to_str:N : }
-\cs_set:Npn \use_v:nnnnn #1#2#3#4#5 {#5}
-\cs_set:Npn \use_iv:nnnnn #1#2#3#4#5 {#4}
-\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
-\cs_generate_variant:Nn \int_set:Nn {Nv}
-\cs_generate_variant:Nn \keys_set:nn {nx}
-\cs_generate_variant:Nn \keys_set_known:nnN {nx}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
-\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
-\cs_new:Nn \__fontspec_int_mult_truncate:Nn
- {
- \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
}
-\cs_new:Npn \__fontspec_error:n { \msg_error:nn {fontspec} }
-\cs_new:Npn \__fontspec_error:nx { \msg_error:nnx {fontspec} }
-\cs_new:Npn \__fontspec_warning:n { \msg_warning:nn {fontspec} }
-\cs_new:Npn \__fontspec_warning:nx { \msg_warning:nnx {fontspec} }
-\cs_new:Npn \__fontspec_warning:nxx { \msg_warning:nnxx {fontspec} }
-\cs_new:Npn \__fontspec_info:n { \msg_info:nn {fontspec} }
-\cs_new:Npn \__fontspec_info:nx { \msg_info:nnx {fontspec} }
-\cs_new:Npn \__fontspec_info:nxx { \msg_info:nnxx {fontspec} }
-\cs_new:Npn \__fontspec_trace:n { \msg_trace:nn {fontspec} }
-\msg_new:nnn {fontspec} {no-size-info}
- {
- Size~ information~ must~ be~ supplied.\\
- For~ example,~ SizeFeatures={Size={8-12},...}.
- }
-\msg_new:nnnn {fontspec} {font-not-found}
- {
- The~ font~ "#1"~ cannot~ be~ found.
- }
- {
- A~font~might~not~be~found~for~many~reasons.\\
- Check~the~spelling,~where~the~font~is~installed~etc.~etc.\\\\
- When~in~doubt,~ask~someone~for~help!
- }
-\msg_new:nnnn {fontspec} {rename-feature-not-exist}
- {
- The~ feature~ #1~ doesn't~ appear~ to~ be~ defined.
- }
- {
- It~ looks~ like~ you're~ trying~ to~ rename~ a~ feature~ that~ doesn't~ exist.
- }
-\msg_new:nnn {fontspec} {no-glyph}
- {
- '\l_fontspec_fontname_tl'~ does~ not~ contain~ glyph~ #1.
- }
-\msg_new:nnnn {fontspec} {euler-too-late}
- {
- The~ euler~ package~ must~ be~ loaded~ BEFORE~ fontspec.
- }
- {
- fontspec~ only~ overwrites~ euler's~ attempt~ to~
- define~ the~ maths~ text~ fonts~ if~ fontspec~ is~
- loaded~ after~ euler.~ Type~ <return>~ to~ proceed~
- with~ incorrect~ \string\mathit,~ \string\mathbf,~ etc.
- }
-\msg_new:nnnn {fontspec} {no-xcolor}
- {
- Cannot~ load~ named~ colours~ without~ the~ xcolor~ package.
- }
- {
- Sorry,~ I~ can't~ do~ anything~ to~ help.~ Instead~ of~ loading~
- the~ color~ package,~ use~ xcolor~ instead.~ It's~ better.
- }
-\msg_new:nnnn {fontspec} {unknown-color-model}
- {
- Error~ loading~ colour~ `#1';~ unknown~ colour~ model.
- }
- {
- Sorry,~ I~ can't~ do~ anything~ to~ help.~ Please~ report~ this~ error~
- to~ my~ developer~ with~ a~ minimal~ example~ that~ causes~ the~ problem.
- }
-\msg_new:nnn {fontspec} {addfontfeatures-ignored}
- {
- \string\addfontfeature (s)~ ignored;~
- it~ cannot~ be~ used~ with~ a~ font~ that~ wasn't~ selected~ by~ fontspec.
- }
-\msg_new:nnn {fontspec} {feature-option-overwrite}
- {
- Option~ '#2'~ of~ font~ feature~ '#1'~ overwritten.
- }
-\msg_new:nnn {fontspec} {script-not-exist-latn}
- {
- Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'.\\
- 'Latin'~ script~ used~ instead.
- }
-\msg_new:nnn {fontspec} {script-not-exist}
- {
- Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'.
- }
-\msg_new:nnn {fontspec} {aat-feature-not-exist}
- {
- '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~
- for~ AAT~ font~ '\l_fontspec_fontname_tl'.
- }
-\msg_new:nnn {fontspec} {aat-feature-not-exist-in-font}
- {
- AAT~ feature~ '\l_keys_key_tl=\l_keys_value_tl'~ (#1)~ not~ available~
- in~ font~ '\l_fontspec_fontname_tl'.
- }
-\msg_new:nnn {fontspec} {icu-feature-not-exist}
- {
- '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~
- for~ OpenType~ font~ '\l_fontspec_fontname_tl'
- }
-\msg_new:nnn {fontspec} {icu-feature-not-exist-in-font}
- {
- OpenType~ feature~ '\l_keys_key_tl=\l_keys_value_tl'~ (#1)~ not~ available~
- for~ font~ '\l_fontspec_fontname_tl'~
- with~ script~ '\l__fontspec_script_name_tl'~ and~ language~ '\l__fontspec_lang_name_tl'.
- }
-\msg_new:nnn {fontspec} {no-opticals}
- {
- '\l_fontspec_fontname_tl'~ doesn't~ appear~ to~ have~ an~ Optical~ Size~ axis.
- }
-\msg_new:nnn {fontspec} {language-not-exist}
- {
- Language~ '#1'~ not~ available~
- for~ font~ '\l_fontspec_fontname_tl'~
- with~ script~ '\l__fontspec_script_name_tl'.\\
- 'Default'~ language~ used~ instead.
- }
-\msg_new:nnn {fontspec} {only-xetex-feature}
- {
- Ignored~ XeTeX~ only~ feature:~ '#1'.
- }
-\msg_new:nnn {fontspec} {only-luatex-feature}
- {
- Ignored~ LuaTeX~ only~ feature:~ '#1'.
- }
-\msg_new:nnn {fontspec} {no-mapping}
- {
- Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX.
- }
-\msg_new:nnn {fontspec} {no-mapping-ligtex}
- {
- Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX.\\
- Use~ "Ligatures=TeX"~ instead~ of~ "Mapping=tex-text".
- }
-\msg_new:nnn {fontspec} {cm-default-obsolete}
- {
- The~ "cm-default"~ package~ option~ is~ obsolete.
- }
-\msg_new:nnn {fontspec} {fakebold-only-xetex}
- {
- The~ "FakeBold"~ and~ "AutoFakeBold"~ options~ are~ only~ available~ with~ XeLaTeX.\\
- Option~ ignored.
- }
-\msg_new:nnn {fontspec} {defining-font}
- {
- Font~ family~'\l_fontspec_family_tl'~ created~ for~ font~ '#2'~
- with~ options~ [\l__fontspec_all_features_clist].\\
- \\
- This~ font~ family~ consists~ of~ the~ following~ shapes:
- \l_fontspec_defined_shapes_tl
- }
-\msg_new:nnn {fontspec} {no-font-shape}
- {
- Could~ not~ resolve~ font~ #1~ (it~ probably~ doesn't~ exist).
- }
-\msg_new:nnn {fontspec} {set-scale}
- {
- \l_fontspec_fontname_tl\space scale ~=~ \l__fontspec_scale_tl.
- }
-\msg_new:nnn {fontspec} {setup-math}
- {
- Adjusting~ the~ maths~ setup~ (use~ [no-math]~ to~ avoid~ this).
- }
-\msg_new:nnn {fontspec} {no-scripts}
- {
- Font~ \l_fontspec_fontname_tl\space does~ not~ contain~ any~ OpenType~ `Script'~ information.
- }
-\msg_new:nnn {fontspec} {opa-twice}
- {
- Opacity~ set~ twice,~ in~ both~ Colour~ and~ Opacity.\\
- Using~ specification~ "Opacity=#1".
- }
-\msg_new:nnn {fontspec} {opa-twice-col}
- {
- Opacity~ set~ twice,~ in~ both~ Opacity~ and~ Colour.\\
- Using~ an~ opacity~ specification~ in~ hex~ of~ "#1/FF".
- }
-\msg_new:nnn {fontspec} {bad-colour}
- {
- Bad~ colour~ declaration~ "#1".~
- Colour~ must~ be~ one~ of:\\
- *~ a~ named~ xcolor~ colour\\
- *~ a~ six-digit~ hex~ colour~ RRGGBB\\
- *~ an~ eight-digit~ hex~ colour~ RRGGBBTT~ with~ opacity
- }
-\DeclareOption{cm-default}
- { \__fontspec_warning:n {cm-default-obsolete} }
-\DeclareOption{math}{\bool_set_true:N \g__fontspec_math_bool}
-\DeclareOption{no-math}{\bool_set_false:N \g__fontspec_math_bool}
-\DeclareOption{config}{\bool_set_true:N \g__fontspec_cfg_bool}
-\DeclareOption{no-config}{\bool_set_false:N \g__fontspec_cfg_bool}
-\DeclareOption{quiet}
- {
- \msg_redirect_module:nnn { fontspec } { warning } { info }
- \msg_redirect_module:nnn { fontspec } { info } { none }
- }
-\DeclareOption{silent}
- {
- \msg_redirect_module:nnn { fontspec } { warning } { none }
- \msg_redirect_module:nnn { fontspec } { info } { none }
- }
-\ExecuteOptions{config,math}
-\ProcessOptions*
-\RequirePackage{fontspec-patches}
-\luatex_if_engine:T { \RequirePackage{fontspec-luatex} \endinput }
-\xetex_if_engine:T { \RequirePackage{fontspec-xetex} \endinput }
-%%
-%% Copyright 2004--2015 Will Robertson <wspr81@gmail.com>
+\sys_if_engine_luatex:T { \RequirePackageWithOptions{fontspec-luatex} }
+\sys_if_engine_xetex:T { \RequirePackageWithOptions{fontspec-xetex} }
+%% ------------------------------------------------
+%% Copyright 2004--2016 Will Robertson <wspr81@gmail.com>
%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
%%
-%% Distributable under the LaTeX Project Public License,
-%% version 1.3c or higher (your choice). The latest version of
-%% this license is at: http://www.latex-project.org/lppl.txt
+%% 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.
-%%
-%% This work consists of this file fontspec.dtx
-%% and the derived files fontspec.sty,
-%% fontspec.lua,
-%% fontspec.cfg,
-%% fontspec-xetex.sty,
-%% fontspec-luatex.sty,
-%% fontspec-patches.sty,
-%% fontspec-example.tex,
-%% and fontspec.pdf.
-%%
+%% It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec-example.tex.
+%% And the derived files: fontspec*.sty,fontspec.lua, and fontspec.pdf.
+%% ------------------------------------------------
%%
%% End of file `fontspec.sty'.
diff --git a/Master/texmf-dist/tex/latex/fontspec/tuenc.def b/Master/texmf-dist/tex/latex/fontspec/tuenc.def
new file mode 100644
index 00000000000..ab0fb8d987e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/tuenc.def
@@ -0,0 +1,90 @@
+\ProvidesFile{tuenc.def}
+ [2016/01/29 v0.1 Unicode font encoding for LaTeX2e]
+
+%%%%%%
+% Please consider this encoding definition to be experimental!
+%%%%%%
+
+\providecommand\UnicodeEncodingName{TU}
+
+
+%% WRAPPERS NEEDED FOR FONT LOADING (.fd FILE COMMANDS)
+
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname XeTeXrevision\endcsname\relax\else
+ \def\UnicodeFontTeXLigatures{mapping=tex-text;}
+\fi
+
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax\else
+ \def\UnicodeFontTeXLigatures{+tlig;} % "+trep;" no longer needed
+\fi
+
+\def\UnicodeFontFile#1#2{"[#1]:#2"}
+\def\UnicodeFontName#1#2{"#1:#2"}
+
+% Alternative luaotfload definitions for LuaLaTeX:
+% \def\UnicodeFontFile#1#2{"file:#1:#2"}
+% \def\UnicodeFontName#1#2{"name:#1:#2"}
+
+
+%% COMMANDS NEEDED TO DEFINE UNICODE COMMANDS AND ACCENTS
+
+% Accents in Unicode are postpended:
+\def\add@unicode@accent#1#2{#2\char#1\relax}
+
+\def\DeclareUnicodeCommand#1#2{%
+ \DeclareTextCommand{#1}{\LastDeclaredEncoding}{#2}%
+}
+
+\def\DeclareUnicodeAccent#1#2{%
+ \DeclareTextCommand{#1}{\LastDeclaredEncoding}{\add@unicode@accent{#2}}%
+}
+
+\def\DeclareUnicodeSymbol#1#2{%
+ \DeclareTextSymbol{#1}{\LastDeclaredEncoding}{#2}%
+}
+
+\def\DeclareUnicodeComposite#1#2#3{%
+ \DeclareTextComposite{#1}{\LastDeclaredEncoding}{#2}{#3}%
+}
+
+\def\DeclareUnicodeCompositeCommand#1#2#3{%
+ \DeclareTextCompositeCommand{#1}{\LastDeclaredEncoding}{#2}{#3}%
+}
+
+
+%% COMMANDS FOR DEFINING NEW ENCODINGS FROM FONT RANGES
+
+\def\NewUnicodeEncoding#1{%
+ \DeclareFontEncoding{#1}{}{}
+ \DeclareErrorFont{\LastDeclaredEncoding}{lmr}{m}{n}{10}
+ \DeclareFontSubstitution{\LastDeclaredEncoding}{lmr}{m}{n}
+ \DeclareFontFamily{\LastDeclaredEncoding}{lmr}{}
+ \DeclareFontShape{\LastDeclaredEncoding}{lmr}{m}{n}
+ {<->\UnicodeFontFile{lmroman10-regular}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{\LastDeclaredEncoding}{lmr}{m}{it}
+ {<->\UnicodeFontFile{lmroman10-italic}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{\LastDeclaredEncoding}{lmr}{m}{sc}
+ {<->\UnicodeFontFile{lmromancaps10-regular}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{\LastDeclaredEncoding}{lmr}{bx}{n}
+ {<->\UnicodeFontFile{lmroman10-bold}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{\LastDeclaredEncoding}{lmr}{bx}{it}
+ {<->\UnicodeFontFile{lmroman10-bolditalic}{\UnicodeFontTeXLigatures}}{}
+}
+
+\def\DeclareUnicodeEncoding#1#2#3{%
+ \NewUnicodeEncoding{#1}%
+ \@for\@ii:=#2\do{%
+ \InputIfFileExists{tufontrange-\@ii.def}{}{%
+ \@latex@error{Unicode font range file `tufontrange-\@ii.def' not found}{\@ehd}%
+ }%
+ }%
+ #3%
+}
+
+%% THE ENCODING ITSELF
+
+\DeclareUnicodeEncoding{\UnicodeEncodingName}{T1,TS1}{}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/fontspec/tufontrange-T1.def b/Master/texmf-dist/tex/latex/fontspec/tufontrange-T1.def
new file mode 100644
index 00000000000..27d9b14eb7f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/tufontrange-T1.def
@@ -0,0 +1,198 @@
+\ProvidesFile{ucfontrange-T1.def}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% T1 SYMBOLS
+
+\DeclareUnicodeAccent{\`}{"0300}
+\DeclareUnicodeAccent{\'}{"0301}
+\DeclareUnicodeAccent{\^}{"0302}
+\DeclareUnicodeAccent{\~}{"0303}
+\DeclareUnicodeAccent{\"}{"0308}
+\DeclareUnicodeAccent{\H}{"030B}
+\DeclareUnicodeAccent{\r}{"030A}
+\DeclareUnicodeAccent{\v}{"030C}
+\DeclareUnicodeAccent{\u}{"0306}
+\DeclareUnicodeAccent{\=}{"0304}
+\DeclareUnicodeAccent{\.}{"0307}
+\DeclareUnicodeAccent{\b}{"0332}
+\DeclareUnicodeAccent{\c}{"0327}
+\DeclareUnicodeAccent{\d}{"0323}
+\DeclareUnicodeAccent{\k}{"0328}
+%% \textogonekcentered %% not in unicode?
+\DeclareUnicodeSymbol{\textperthousand}{"2030}
+\DeclareUnicodeSymbol{\textpertenthousand}{"2031}
+\DeclareUnicodeSymbol{\AE}{"00C6}
+\DeclareUnicodeSymbol{\DH}{"00D0}
+\DeclareUnicodeSymbol{\DJ}{"0110}
+\DeclareUnicodeSymbol{\L} {"0141}
+\DeclareUnicodeSymbol{\NG}{"014A}
+\DeclareUnicodeSymbol{\OE}{"0152}
+\DeclareUnicodeSymbol{\O} {"00D8}
+\DeclareUnicodeSymbol{\SS}{"1E9E}
+\DeclareUnicodeSymbol{\TH}{"00DE}
+\DeclareUnicodeSymbol{\ae}{"00E6}
+\DeclareUnicodeSymbol{\dh}{"00F0}
+\DeclareUnicodeSymbol{\dj}{"0111}
+\DeclareUnicodeSymbol{\guillemotleft}{"00AB}
+\DeclareUnicodeSymbol{\guillemotright}{"00BB}
+\DeclareUnicodeSymbol{\guilsinglleft}{"2039}
+\DeclareUnicodeSymbol{\guilsinglright}{"203A}
+\DeclareUnicodeSymbol{\i} {"0131}
+\DeclareUnicodeSymbol{\j} {"0237}
+\DeclareUnicodeSymbol{\ij}{"0133}
+\DeclareUnicodeSymbol{\IJ}{"0132}
+\DeclareUnicodeSymbol{\l} {"0142}
+\DeclareUnicodeSymbol{\ng}{"014B}
+\DeclareUnicodeSymbol{\oe}{"0153}
+\DeclareUnicodeSymbol{\o} {"00F8}
+\DeclareUnicodeSymbol{\quotedblbase}{"201E}
+\DeclareUnicodeSymbol{\quotesinglbase}{"201A}
+\DeclareUnicodeSymbol{\ss}{"00DF}
+\DeclareUnicodeSymbol{\textasciicircum}{`\^}
+\DeclareUnicodeSymbol{\textasciitilde}{`\~}
+\DeclareUnicodeSymbol{\textbackslash}{`\\}
+\DeclareUnicodeSymbol{\textbar}{`\|}
+\DeclareUnicodeSymbol{\textbraceleft}{`\{}
+\DeclareUnicodeSymbol{\textbraceright}{`\}}
+\DeclareUnicodeSymbol{\textcompwordmark}{"200C}
+\DeclareUnicodeSymbol{\textdollar}{`\$}
+\DeclareUnicodeSymbol{\textemdash}{"2014}
+\DeclareUnicodeSymbol{\textendash}{"2013}
+\DeclareUnicodeSymbol{\textexclamdown}{"00A1}
+\DeclareUnicodeSymbol{\textgreater}{`\>}
+\DeclareUnicodeSymbol{\textless}{`\<}
+\DeclareUnicodeSymbol{\textquestiondown}{"00BF}
+\DeclareUnicodeSymbol{\textquotedblleft}{"201C}
+\DeclareUnicodeSymbol{\textquotedblright}{"201D}
+\DeclareUnicodeSymbol{\textquotedbl}{`\"}
+\DeclareUnicodeSymbol{\textquoteleft}{"2018}
+\DeclareUnicodeSymbol{\textquoteright}{"2019}
+\DeclareUnicodeSymbol{\textsection}{"00A7}
+\DeclareUnicodeSymbol{\textsterling}{"00A3}
+\DeclareUnicodeSymbol{\textunderscore}{`\_}
+\DeclareUnicodeSymbol{\textvisiblespace}{"2423}
+\DeclareUnicodeSymbol{\th}{"00FE}
+\DeclareUnicodeComposite{\.}{i}{`\i}
+\DeclareUnicodeComposite{\.}{\i}{`\i}
+\DeclareUnicodeComposite{\u}{A}{"0102}
+\DeclareUnicodeComposite{\k}{A}{"0104}
+\DeclareUnicodeComposite{\'}{C}{"0106}
+\DeclareUnicodeComposite{\v}{C}{"010C}
+\DeclareUnicodeComposite{\v}{D}{"010E}
+\DeclareUnicodeComposite{\v}{E}{"011A}
+\DeclareUnicodeComposite{\k}{E}{"0118}
+\DeclareUnicodeComposite{\u}{G}{"011E}
+\DeclareUnicodeComposite{\'}{L}{"0139}
+\DeclareUnicodeComposite{\v}{L}{"013D}
+\DeclareUnicodeComposite{\'}{N}{"0143}
+\DeclareUnicodeComposite{\v}{N}{"0147}
+\DeclareUnicodeComposite{\H}{O}{"0150}
+\DeclareUnicodeComposite{\'}{R}{"0154}
+\DeclareUnicodeComposite{\v}{R}{"0158}
+\DeclareUnicodeComposite{\'}{S}{"015A}
+\DeclareUnicodeComposite{\v}{S}{"0160}
+\DeclareUnicodeComposite{\c}{S}{"015F}
+\DeclareUnicodeComposite{\v}{T}{"0164}
+\DeclareUnicodeComposite{\c}{T}{"0162}
+\DeclareUnicodeComposite{\H}{U}{"0170}
+\DeclareUnicodeComposite{\r}{U}{"016E}
+\DeclareUnicodeComposite{\"}{Y}{"0178}
+\DeclareUnicodeComposite{\'}{Z}{"017A}
+\DeclareUnicodeComposite{\v}{Z}{"017D}
+\DeclareUnicodeComposite{\.}{Z}{"017B}
+\DeclareUnicodeComposite{\.}{I}{"0130}
+\DeclareUnicodeComposite{\u}{a}{"0103}
+\DeclareUnicodeComposite{\k}{a}{"0105}
+\DeclareUnicodeComposite{\'}{c}{"0107}
+\DeclareUnicodeComposite{\v}{c}{"010D}
+\DeclareUnicodeComposite{\v}{d}{"010F}
+\DeclareUnicodeComposite{\v}{e}{"011B}
+\DeclareUnicodeComposite{\k}{e}{"0119}
+\DeclareUnicodeComposite{\u}{g}{"011F}
+\DeclareUnicodeComposite{\'}{l}{"0139}
+\DeclareUnicodeComposite{\v}{l}{"013E}
+\DeclareUnicodeComposite{\'}{n}{"0144}
+\DeclareUnicodeComposite{\v}{n}{"0148}
+\DeclareUnicodeComposite{\H}{o}{"0151}
+\DeclareUnicodeComposite{\'}{r}{"0155}
+\DeclareUnicodeComposite{\v}{r}{"0159}
+\DeclareUnicodeComposite{\'}{s}{"015B}
+\DeclareUnicodeComposite{\v}{s}{"0161}
+\DeclareUnicodeComposite{\c}{s}{"015F}
+\DeclareUnicodeComposite{\v}{t}{"0165}
+\DeclareUnicodeComposite{\c}{t}{"0163}
+\DeclareUnicodeComposite{\H}{u}{"0171}
+\DeclareUnicodeComposite{\r}{u}{"016F}
+\DeclareUnicodeComposite{\"}{y}{"00FF}
+\DeclareUnicodeComposite{\'}{z}{"00FD}
+\DeclareUnicodeComposite{\v}{z}{"017E}
+\DeclareUnicodeComposite{\.}{z}{"017C}
+\DeclareUnicodeComposite{\`}{A}{"00C0}
+\DeclareUnicodeComposite{\'}{A}{"00C1}
+\DeclareUnicodeComposite{\^}{A}{"00C2}
+\DeclareUnicodeComposite{\~}{A}{"00C3}
+\DeclareUnicodeComposite{\"}{A}{"00C4}
+\DeclareUnicodeComposite{\r}{A}{"00C5}
+\DeclareUnicodeComposite{\c}{C}{"00C7}
+\DeclareUnicodeComposite{\`}{E}{"00C8}
+\DeclareUnicodeComposite{\'}{E}{"00C9}
+\DeclareUnicodeComposite{\^}{E}{"00CA}
+\DeclareUnicodeComposite{\"}{E}{"00CB}
+\DeclareUnicodeComposite{\`}{I}{"00CC}
+\DeclareUnicodeComposite{\'}{I}{"00CD}
+\DeclareUnicodeComposite{\^}{I}{"00CE}
+\DeclareUnicodeComposite{\"}{I}{"00CF}
+\DeclareUnicodeComposite{\~}{N}{"00D1}
+\DeclareUnicodeComposite{\`}{O}{"00D2}
+\DeclareUnicodeComposite{\'}{O}{"00D3}
+\DeclareUnicodeComposite{\^}{O}{"00D4}
+\DeclareUnicodeComposite{\~}{O}{"00D5}
+\DeclareUnicodeComposite{\"}{O}{"00D6}
+\DeclareUnicodeComposite{\`}{U}{"00D9}
+\DeclareUnicodeComposite{\'}{U}{"00DA}
+\DeclareUnicodeComposite{\^}{U}{"00DB}
+\DeclareUnicodeComposite{\"}{U}{"00DC}
+\DeclareUnicodeComposite{\'}{Y}{"00DD}
+\DeclareUnicodeComposite{\`}{a}{"00E0}
+\DeclareUnicodeComposite{\'}{a}{"00E1}
+\DeclareUnicodeComposite{\^}{a}{"00E2}
+\DeclareUnicodeComposite{\~}{a}{"00E3}
+\DeclareUnicodeComposite{\"}{a}{"00E4}
+\DeclareUnicodeComposite{\r}{a}{"00E5}
+\DeclareUnicodeComposite{\c}{c}{"00E7}
+\DeclareUnicodeComposite{\`}{e}{"00E8}
+\DeclareUnicodeComposite{\'}{e}{"00E9}
+\DeclareUnicodeComposite{\^}{e}{"00EA}
+\DeclareUnicodeComposite{\"}{e}{"00EB}
+\DeclareUnicodeComposite{\`}{i} {"00EC}
+\DeclareUnicodeComposite{\`}{\i}{"00EC}
+\DeclareUnicodeComposite{\'}{i} {"00ED}
+\DeclareUnicodeComposite{\'}{\i}{"00ED}
+\DeclareUnicodeComposite{\^}{i} {"00EE}
+\DeclareUnicodeComposite{\^}{\i}{"00EE}
+\DeclareUnicodeComposite{\"}{i} {"00EF}
+\DeclareUnicodeComposite{\"}{\i}{"00EF}
+\DeclareUnicodeComposite{\~}{n}{"00F1}
+\DeclareUnicodeComposite{\`}{o}{"00F2}
+\DeclareUnicodeComposite{\'}{o}{"00F3}
+\DeclareUnicodeComposite{\^}{o}{"00F4}
+\DeclareUnicodeComposite{\~}{o}{"00F5}
+\DeclareUnicodeComposite{\"}{o}{"00F6}
+\DeclareUnicodeComposite{\`}{u}{"00F9}
+\DeclareUnicodeComposite{\'}{u}{"00FA}
+\DeclareUnicodeComposite{\^}{u}{"00FB}
+\DeclareUnicodeComposite{\"}{u}{"00FC}
+\DeclareUnicodeComposite{\'}{y}{"00FD}
+\DeclareUnicodeComposite{\k}{o}{"01EB}
+\DeclareUnicodeComposite{\k}{O}{"01EA}
+
+\DeclareUnicodeComposite{\c}{G}{"0122}
+\DeclareUnicodeComposite{\c}{g}{"0123} % note this cedilla is above not below :)
+\DeclareUnicodeComposite{\c}{K}{"0136}
+\DeclareUnicodeComposite{\c}{k}{"0137}
+\DeclareUnicodeComposite{\c}{L}{"013B}
+\DeclareUnicodeComposite{\c}{l}{"013C}
+\DeclareUnicodeComposite{\c}{N}{"0145}
+\DeclareUnicodeComposite{\c}{n}{"0146}
+\DeclareUnicodeComposite{\c}{R}{"0156}
+\DeclareUnicodeComposite{\c}{r}{"0157}
diff --git a/Master/texmf-dist/tex/latex/fontspec/tufontrange-TS1.def b/Master/texmf-dist/tex/latex/fontspec/tufontrange-TS1.def
new file mode 100644
index 00000000000..4f6fdec4141
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/tufontrange-TS1.def
@@ -0,0 +1,134 @@
+\ProvidesFile{ucfontrange-TS1.def}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% TS1 symbols
+
+\DeclareUnicodeAccent{\capitalcedilla}{"0327}
+\DeclareUnicodeAccent{\capitalogonek}{"0328}
+\DeclareUnicodeAccent{\capitalgrave}{"0300}
+\DeclareUnicodeAccent{\capitalacute}{"0301}
+\DeclareUnicodeAccent{\capitalcircumflex}{"0302}
+\DeclareUnicodeAccent{\capitaltilde}{"0303}
+\DeclareUnicodeAccent{\capitaldieresis}{"0308}
+\DeclareUnicodeAccent{\capitalhungarumlaut}{"030B}
+\DeclareUnicodeAccent{\capitalring}{"030A}
+\DeclareUnicodeAccent{\capitalcaron}{"030C}
+\DeclareUnicodeAccent{\capitalbreve}{"0306}
+\DeclareUnicodeAccent{\capitalmacron}{"0304}
+\DeclareUnicodeAccent{\capitaldotaccent}{"0307}
+\DeclareUnicodeAccent{\t}{"0361}
+\DeclareUnicodeAccent{\capitaltie}{"0361}
+\DeclareUnicodeAccent{\newtie}{"0311}
+\DeclareUnicodeAccent{\capitalnewtie}{"0311}
+%%\DeclareUnicodeSymbol{\textcapitalcompwordmark}{23}
+%%\DeclareUnicodeSymbol{\textascendercompwordmark}{31}
+\DeclareUnicodeSymbol{\textquotestraightbase}{"201A}
+\DeclareUnicodeSymbol{\textquotestraightdblbase}{"201E}
+\DeclareUnicodeSymbol{\texttwelveudash}{"2015}
+\DeclareUnicodeSymbol{\textthreequartersemdash}{"2012}
+\DeclareUnicodeSymbol{\textleftarrow}{"2190}
+\DeclareUnicodeSymbol{\textrightarrow}{"2192}
+\DeclareUnicodeSymbol{\textblank}{"2422}
+\DeclareUnicodeSymbol{\textdollar}{`\$}
+\DeclareUnicodeSymbol{\textquotesingle}{`\'}
+\DeclareUnicodeSymbol{\textasteriskcentered}{"204E}
+%% \DeclareUnicodeSymbol{\textdblhyphen}{45}
+\DeclareUnicodeSymbol{\textfractionsolidus}{"2044}
+%%\DeclareUnicodeSymbol{\textzerooldstyle}{48}
+%%\DeclareUnicodeSymbol{\textoneoldstyle}{49}
+%%\DeclareUnicodeSymbol{\texttwooldstyle}{50}
+%%\DeclareUnicodeSymbol{\textthreeoldstyle}{51}
+%%\DeclareUnicodeSymbol{\textfouroldstyle}{52}
+%%\DeclareUnicodeSymbol{\textfiveoldstyle}{53}
+%%\DeclareUnicodeSymbol{\textsixoldstyle}{54}
+%%\DeclareUnicodeSymbol{\textsevenoldstyle}{55}
+%%\DeclareUnicodeSymbol{\texteightoldstyle}{56}
+%%\DeclareUnicodeSymbol{\textnineoldstyle}{57}
+\DeclareUnicodeSymbol{\textlangle}{"27E8}
+\DeclareUnicodeSymbol{\textminus}{"2212}
+\DeclareUnicodeSymbol{\textrangle}{"27E9}
+\DeclareUnicodeSymbol{\textmho}{"2127}
+\DeclareUnicodeSymbol{\textbigcircle}{"25EF}
+\DeclareUnicodeAccent{\textcircled}{"20DD}
+\DeclareUnicodeSymbol{\textohm}{"2126}
+\DeclareUnicodeSymbol{\textlbrackdbl}{"301A}
+\DeclareUnicodeSymbol{\textrbrackdbl}{"301B}
+\DeclareUnicodeSymbol{\textuparrow}{"2191}
+\DeclareUnicodeSymbol{\textdownarrow}{"2193}
+\DeclareUnicodeSymbol{\textasciigrave}{`\`}
+\DeclareUnicodeSymbol{\textborn}{"2605} %% actually "black star" but close enough
+\DeclareUnicodeSymbol{\textdivorced}{"26AE}
+\DeclareUnicodeSymbol{\textdied}{"2020} %% different from "dagger"??
+%% \DeclareUnicodeSymbol{\textleaf}{108}
+\DeclareUnicodeSymbol{\textmarried}{"26AD}
+\DeclareUnicodeSymbol{\textmusicalnote}{"266A}
+\DeclareUnicodeSymbol{\texttildelow}{"02F7}
+%% \DeclareUnicodeSymbol{\textdblhyphenchar}{127} %% can't obtain this without deactivating font mapping :(
+\DeclareUnicodeSymbol{\textasciibreve}{"02D8}
+\DeclareUnicodeSymbol{\textasciicaron}{"02C7}
+\DeclareUnicodeSymbol{\textacutedbl}{"02DD}
+\DeclareUnicodeSymbol{\textgravedbl}{"02F5}
+\DeclareUnicodeSymbol{\textdagger}{"2020}
+\DeclareUnicodeSymbol{\textdaggerdbl}{"2021}
+\DeclareUnicodeSymbol{\textbardbl}{"2016}
+\DeclareUnicodeSymbol{\textperthousand}{"2030}
+\DeclareUnicodeSymbol{\textbullet}{"2022}
+\DeclareUnicodeSymbol{\textcelsius}{"2103}
+%% \DeclareUnicodeSymbol{\textdollaroldstyle}{138}
+%% \DeclareUnicodeSymbol{\textcentoldstyle}{139}
+\DeclareUnicodeSymbol{\textflorin}{"0192}
+\DeclareUnicodeSymbol{\textcolonmonetary}{"20A1}
+\DeclareUnicodeSymbol{\textwon}{"20A9}
+\DeclareUnicodeSymbol{\textnaira}{"20A6}
+%% \DeclareUnicodeSymbol{\textguarani}{144}
+\DeclareUnicodeSymbol{\textpeso}{"20B1}
+\DeclareUnicodeSymbol{\textlira}{"20A4}
+\DeclareUnicodeSymbol{\textrecipe}{"211E}
+\DeclareUnicodeSymbol{\textinterrobang}{"203D}
+\DeclareUnicodeSymbol{\textinterrobangdown}{"2E18}
+\DeclareUnicodeSymbol{\textdong}{"20AB}
+\DeclareUnicodeSymbol{\texttrademark}{"2122}
+\DeclareUnicodeSymbol{\textpertenthousand}{"2031}
+\DeclareUnicodeSymbol{\textpilcrow}{"00B6}
+\DeclareUnicodeSymbol{\textbaht}{"0E3F}
+\DeclareUnicodeSymbol{\textnumero}{"2116}
+\DeclareUnicodeSymbol{\textdiscount}{"2052}
+\DeclareUnicodeSymbol{\textestimated}{"212E}
+\DeclareUnicodeSymbol{\textopenbullet}{"25E6}
+\DeclareUnicodeSymbol{\textservicemark}{"2120}
+\DeclareUnicodeSymbol{\textlquill}{"2045}
+\DeclareUnicodeSymbol{\textrquill}{"2046}
+\DeclareUnicodeSymbol{\textcent}{"00A2}
+\DeclareUnicodeSymbol{\textsterling}{"00A3}
+\DeclareUnicodeSymbol{\textcurrency}{"00A4}
+\DeclareUnicodeSymbol{\textyen}{"00A5}
+\DeclareUnicodeSymbol{\textbrokenbar}{"00A6}
+\DeclareUnicodeSymbol{\textsection}{"00A7}
+\DeclareUnicodeSymbol{\textasciidieresis}{"00A8}
+\DeclareUnicodeSymbol{\textcopyright}{"00A9}
+\DeclareUnicodeSymbol{\textordfeminine}{"00AA}
+%% \DeclareUnicodeSymbol{\textcopyleft}{171}
+\DeclareUnicodeSymbol{\textlnot}{"00AC}
+\DeclareUnicodeSymbol{\textcircledP}{"2117}
+\DeclareUnicodeSymbol{\textregistered}{"00AE}
+\DeclareUnicodeSymbol{\textasciimacron}{"00AF}
+\DeclareUnicodeSymbol{\textdegree}{"00B0}
+\DeclareUnicodeSymbol{\textpm}{"00B1}
+\DeclareUnicodeSymbol{\texttwosuperior}{"00B2}
+\DeclareUnicodeSymbol{\textthreesuperior}{"00B3}
+\DeclareUnicodeSymbol{\textasciiacute}{"00B4}
+\DeclareUnicodeSymbol{\textmu}{"00B5}
+\DeclareUnicodeSymbol{\textparagraph}{"00B6}
+\DeclareUnicodeSymbol{\textperiodcentered}{"00B7}
+\DeclareUnicodeSymbol{\textreferencemark}{"203B}
+\DeclareUnicodeSymbol{\textonesuperior}{"00B9}
+\DeclareUnicodeSymbol{\textordmasculine}{"00BA}
+\DeclareUnicodeSymbol{\textsurd}{"221A}
+\DeclareUnicodeSymbol{\textonequarter}{"00BC}
+\DeclareUnicodeSymbol{\textonehalf}{"00BD}
+\DeclareUnicodeSymbol{\textthreequarters}{"00BE}
+\DeclareUnicodeSymbol{\texteuro}{"20AC}
+\DeclareUnicodeSymbol{\texttimes}{"00D7}
+\DeclareUnicodeSymbol{\textdiv}{"00F7}
+
diff --git a/Master/texmf-dist/tex/latex/fontspec/tulmr.fd b/Master/texmf-dist/tex/latex/fontspec/tulmr.fd
new file mode 100644
index 00000000000..fe637c02f75
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/tulmr.fd
@@ -0,0 +1,43 @@
+
+\ProvidesFile{tulmr.fd}[2009/10/30 v1.6 Font defs for Latin Modern]
+\DeclareFontFamily{TU}{lmr}{}
+\DeclareFontShape{TU}{lmr}{m}{n}%
+ {<-5.5> \UnicodeFontFile{lmroman5-regular}{\UnicodeFontTeXLigatures} <5.5-6.5> \UnicodeFontFile{lmroman6-regular}{\UnicodeFontTeXLigatures}
+ <6.5-7.5> \UnicodeFontFile{lmroman7-regular}{\UnicodeFontTeXLigatures} <7.5-8.5> \UnicodeFontFile{lmroman8-regular}{\UnicodeFontTeXLigatures}
+ <8.5-9.5> \UnicodeFontFile{lmroman9-regular}{\UnicodeFontTeXLigatures} <9.5-11> \UnicodeFontFile{lmroman10-regular}{\UnicodeFontTeXLigatures}
+ <11-15> \UnicodeFontFile{lmroman12-regular}{\UnicodeFontTeXLigatures}
+ <15-> \UnicodeFontFile{lmroman17-regular}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmr}{m}{sl}%
+ {<-8.5> \UnicodeFontFile{lmromanslant8-regular}{\UnicodeFontTeXLigatures} <8.5-9.5> \UnicodeFontFile{lmromanslant9-regular}{\UnicodeFontTeXLigatures}
+ <9.5-11> \UnicodeFontFile{lmromanslant10-regular}{\UnicodeFontTeXLigatures} <11-15> \UnicodeFontFile{lmromanslant12-regular}{\UnicodeFontTeXLigatures}
+ <15-> \UnicodeFontFile{lmromanslant17-regular}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmr}{m}{it}%
+ {<-7.5> \UnicodeFontFile{lmroman7-italic}{\UnicodeFontTeXLigatures}
+ <7.5-8.5> \UnicodeFontFile{lmroman8-italic}{\UnicodeFontTeXLigatures} <8.5-9.5> \UnicodeFontFile{lmroman9-italic}{\UnicodeFontTeXLigatures}
+ <9.5-11> \UnicodeFontFile{lmroman10-italic}{\UnicodeFontTeXLigatures} <11-> \UnicodeFontFile{lmroman12-italic}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmr}{m}{sc}%
+ {<-> \UnicodeFontFile{lmromancaps10-regular}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{m}{ui}%
+ {<-> ec-lmu10}{}
+\DeclareFontShape{TU}{lmr}{m}{scsl}%
+ {<-> \UnicodeFontFile{lmromancaps10-oblique}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{b}{n}
+ {<-> \UnicodeFontFile{lmromandemi10-regular}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{b}{sl}
+ {<-> \UnicodeFontFile{lmromandemi10-oblique}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{bx}{n}
+ {<-5.5> \UnicodeFontFile{lmroman5-bold}{\UnicodeFontTeXLigatures} <5.5-6.5> \UnicodeFontFile{lmroman6-bold}{\UnicodeFontTeXLigatures}
+ <6.5-7.5> \UnicodeFontFile{lmroman7-bold}{\UnicodeFontTeXLigatures} <7.5-8.5> \UnicodeFontFile{lmroman8-bold}{\UnicodeFontTeXLigatures}
+ <8.5-9.5> \UnicodeFontFile{lmroman9-bold}{\UnicodeFontTeXLigatures} <9.5-11> \UnicodeFontFile{lmroman10-bold}{\UnicodeFontTeXLigatures}
+ <11-> \UnicodeFontFile{lmroman12-bold}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmr}{bx}{it}
+ {<-> \UnicodeFontFile{lmroman10-bolditalic}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{bx}{sl}
+ {<-> \UnicodeFontFile{lmromanslant10-bold}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmr}{b}{it}
+ {<->sub * lmr/b/sl}{}
+\endinput
diff --git a/Master/texmf-dist/tex/latex/fontspec/tulmss.fd b/Master/texmf-dist/tex/latex/fontspec/tulmss.fd
new file mode 100644
index 00000000000..cecaba1f4c1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/tulmss.fd
@@ -0,0 +1,36 @@
+
+\ProvidesFile{tulmss.fd}[2009/10/30 v1.6 Font defs for Latin Modern]
+\DeclareFontFamily{TU}{lmss}{}
+\DeclareFontShape{TU}{lmss}{m}{n}
+ {<-8.5> \UnicodeFontFile{lmsans8-regular}{\UnicodeFontTeXLigatures}
+ <8.5-9.5> \UnicodeFontFile{lmsans9-regular}{\UnicodeFontTeXLigatures} <9.5-11> \UnicodeFontFile{lmsans10-regular}{\UnicodeFontTeXLigatures}
+ <11-15.5> \UnicodeFontFile{lmsans12-regular}{\UnicodeFontTeXLigatures} <15.5-> \UnicodeFontFile{lmsans17-regular}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmss}{m}{it}
+ {<->ssub*lmss/m/sl}{}
+\DeclareFontShape{TU}{lmss}{m}{sl}
+ {<-8.5> \UnicodeFontFile{lmsans8-oblique}{\UnicodeFontTeXLigatures}
+ <8.5-9.5> \UnicodeFontFile{lmsans9-oblique}{\UnicodeFontTeXLigatures} <9.5-11> \UnicodeFontFile{lmsans10-oblique}{\UnicodeFontTeXLigatures}
+ <11-15.5> \UnicodeFontFile{lmsans12-oblique}{\UnicodeFontTeXLigatures} <15.5-> \UnicodeFontFile{lmsans17-oblique}{\UnicodeFontTeXLigatures}
+ }{}
+\DeclareFontShape{TU}{lmss}{m}{sc}
+ {<->sub*lmr/m/sc}{}
+\DeclareFontShape{TU}{lmss}{b}{n}
+ {<->ssub * lmss/bx/n}{}
+\DeclareFontShape{TU}{lmss}{b}{sl}
+ {<->ssub * lmss/bx/sl}{}
+\DeclareFontShape{TU}{lmss}{b}{it}
+ {<->ssub * lmss/bx/it}{}
+\DeclareFontShape{TU}{lmss}{sbc}{n}
+ {<-> \UnicodeFontFile{lmsansdemicond10-regular}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmss}{sbc}{sl}
+ {<-> \UnicodeFontFile{lmsansdemicond10-oblique}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmss}{sbc}{it}
+ {<->ssub*lmss/sbc/sl}{}
+\DeclareFontShape{TU}{lmss}{bx}{n}
+ {<-> \UnicodeFontFile{lmsans10-bold}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmss}{bx}{sl}
+ {<-> \UnicodeFontFile{lmsans10-boldoblique}{\UnicodeFontTeXLigatures}}{}
+\DeclareFontShape{TU}{lmss}{bx}{it}
+ {<->ssub*lmss/bx/sl}{}
+\endinput
diff --git a/Master/texmf-dist/tex/latex/fontspec/tulmtt.fd b/Master/texmf-dist/tex/latex/fontspec/tulmtt.fd
new file mode 100644
index 00000000000..328dd3a7365
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/tulmtt.fd
@@ -0,0 +1,68 @@
+
+\ProvidesFile{tulmtt.fd}[2009/10/30 v1.6 Font defs for Latin Modern]
+\DeclareFontFamily{TU}{lmtt}{\hyphenchar \font\m@ne}
+
+\ifx\lmtt@use@light@as@normal\@empty
+\DeclareFontShape{TU}{lmtt}{sb}{n}
+ {<-8.5> \UnicodeFontFile{lmmono8-regular}{} <8.5-9.5> \UnicodeFontFile{lmmono9-regular}{}
+ <9.5-11> \UnicodeFontFile{lmmono10-regular}{} <11-> \UnicodeFontFile{lmmono12-regular}{}
+ }{}
+\DeclareFontShape{TU}{lmtt}{sb}{it}
+ {<-> \UnicodeFontFile{lmmono10-italic}{}}{}
+\DeclareFontShape{TU}{lmtt}{sb}{sl}
+ {<-> \UnicodeFontFile{lmmonoslant10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{sb}{sc}
+ {<-> \UnicodeFontFile{lmmonocaps10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{sb}{scsl}
+ {<-> \UnicodeFontFile{lmmonocaps10-oblique}{}}{}
+\DeclareFontShape{TU}{lmtt}{m}{n}
+ {<-> \UnicodeFontFile{lmmonolt10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{m}{it}
+ {<->sub*lmtt/l/sl}{}
+\DeclareFontShape{TU}{lmtt}{m}{sl}
+ {<-> \UnicodeFontFile{lmmonolt10-oblique}{}}{}
+\DeclareFontShape{TU}{lmtt}{c}{n}
+ {<-> \UnicodeFontFile{lmmonoltcond10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{c}{it}
+ {<->sub*lmtt/lc/sl}{}
+\DeclareFontShape{TU}{lmtt}{c}{sl}
+ {<-> \UnicodeFontFile{lmmonoltcond10-oblique}{}}{}
+\else
+\DeclareFontShape{TU}{lmtt}{m}{n}
+ {<-8.5> \UnicodeFontFile{lmmono8-regular}{} <8.5-9.5> \UnicodeFontFile{lmmono9-regular}{}
+ <9.5-11> \UnicodeFontFile{lmmono10-regular}{} <11-> \UnicodeFontFile{lmmono12-regular}{}
+ }{}
+\DeclareFontShape{TU}{lmtt}{m}{it}
+ {<-> \UnicodeFontFile{lmmono10-italic}{}}{}
+\DeclareFontShape{TU}{lmtt}{m}{sl}
+ {<-> \UnicodeFontFile{lmmonoslant10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{m}{sc}
+ {<-> \UnicodeFontFile{lmmonocaps10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{m}{scsl}
+ {<-> \UnicodeFontFile{lmmonocaps10-oblique}{}}{}
+\DeclareFontShape{TU}{lmtt}{l}{n}
+ {<-> \UnicodeFontFile{lmmonolt10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{l}{it}
+ {<->sub*lmtt/l/sl}{}
+\DeclareFontShape{TU}{lmtt}{l}{sl}
+ {<-> \UnicodeFontFile{lmmonolt10-oblique}{}}{}
+\DeclareFontShape{TU}{lmtt}{lc}{n}
+ {<-> \UnicodeFontFile{lmmonoltcond10-regular}{}}{}
+\DeclareFontShape{TU}{lmtt}{lc}{it}
+ {<->sub*lmtt/lc/sl}{}
+\DeclareFontShape{TU}{lmtt}{lc}{sl}
+ {<-> \UnicodeFontFile{lmmonoltcond10-oblique}{}}{}
+\fi
+\DeclareFontShape{TU}{lmtt}{b}{n}
+ {<-> \UnicodeFontFile{lmmonolt10-bold}{}}{}
+\DeclareFontShape{TU}{lmtt}{b}{it}
+ {<->sub*lmtt/b/sl}{}
+\DeclareFontShape{TU}{lmtt}{b}{sl}
+{<-> \UnicodeFontFile{lmmonolt10-boldoblique}{}}{}
+\DeclareFontShape{TU}{lmtt}{bx}{it}
+ {<->sub*lmtt/b/sl}{}
+\DeclareFontShape{TU}{lmtt}{bx}{n}
+ {<->ssub*lmtt/b/n}{}
+\DeclareFontShape{TU}{lmtt}{bx}{sl}
+ {<->ssub*lmtt/b/sl}{}
+\endinput