summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-05 22:03:43 +0000
committerKarl Berry <karl@freefriends.org>2017-11-05 22:03:43 +0000
commitfadf897731beed45903c8aa6dd643dafd0e33da5 (patch)
tree4893f081b85951f4336152d0ee039ce167342aea /Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
parent96df06aed2adaad19e3e14d6665b2ffc507a2b9c (diff)
fontspec (5nov17)
git-svn-id: svn://tug.org/texlive/trunk@45697 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty414
1 files changed, 248 insertions, 166 deletions
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
index ee1f0dbdf01..39c0e81ba85 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
@@ -5,6 +5,7 @@
%% The original source files were:
%%
%% fontspec.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-code-load.dtx (with options: `fontspec,XE,xetexx')
%% fontspec-vars.dtx (with options: `fontspec,XE,xetexx')
%% fontspec-msg.dtx (with options: `fontspec,XE,xetexx')
%% fontspec-opening.dtx (with options: `fontspec,XE,xetexx')
@@ -26,21 +27,28 @@
%% fontspec-xfss.dtx (with options: `fontspec,XE,xetexx')
%% fontspec-patches.dtx (with options: `fontspec,XE,xetexx')
%% ------------------------------------------------
-%% The FONTSPEC package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2017 Will Robertson and Khaled Hosny
-%% License information appended.
+%% The FONTSPEC package <wspr.io/fontspec>
%% ------------------------------------------------
-\RequirePackage{expl3}
+%% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+%% Copyright 2009-2013 Khaled Hosny
+%% ------------------------------------------------
+%% This package is free software and may be redistributed and/or modified under
+%% the conditions of the LaTeX Project Public License, version 1.3c or higher
+%% (your choice): <http://www.latex-project.org/lppl/>.
+%% ------------------------------------------------
+%%^^A%% fontspec.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-xetex}%
- {2017/09/22}{2.6e}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/11/05}{2.6f}{Font selection for XeLaTeX and LuaLaTeX}
+
+%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
\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
@@ -54,6 +62,7 @@
\bool_new:N \g__fontspec_cfg_bool
\bool_new:N \g__fontspec_math_bool
\bool_new:N \g__fontspec_euenc_bool
+\bool_new:N \l__fontspec_tmpa_bool
\bool_new:N \l__fontspec_disable_defaults_bool
\bool_new:N \l__fontspec_alias_bool
\bool_new:N \l__fontspec_external_bool
@@ -77,13 +86,67 @@
\seq_new:N \g__fontspec_bf_series_seq
\clist_new:N \g__fontspec_default_fontopts_clist
\clist_new:N \g__fontspec_all_keyval_modules_clist
+\clist_new:N \l__fontspec_sizefeat_clist
\clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}}
+\clist_new:N \l__fontspec_extensions_clist
+\clist_new:N \l__fontspec_fontopts_clist
+\clist_new:N \l__fontspec_family_fontopts_clist
+\clist_new:N \l__fontspec_all_features_clist
+\clist_new:N \l__fontspec_leftover_clist
+\clist_new:N \l__fontspec_keys_leftover_clist
+\clist_new:N \l__fontspec_sizing_leftover_clist
+\clist_new:N \l__fontspec_fontfeat_clist
+\clist_new:N \l__fontspec_fontfeat_curr_clist
+\tl_new:N \l__fontspec_fontfeat_up_clist
+\tl_new:N \l__fontspec_fontfeat_bf_clist
+\tl_new:N \l__fontspec_fontfeat_it_clist
+\tl_new:N \l__fontspec_fontfeat_bfit_clist
+\tl_new:N \l__fontspec_fontfeat_sl_clist
+\tl_new:N \l__fontspec_fontfeat_bfsl_clist
+\tl_new:N \l__fontspec_fontfeat_sc_clist
\prop_new:N \g__fontspec_fontopts_prop
\prop_new:N \l__fontspec_nfss_prop
\prop_new:N \l__fontspec_nfssfont_prop
\prop_new:N \g__fontspec_OT_features_prop
\prop_new:N \g__fontspec_all_opentype_feature_names_prop
\prop_new:N \g__fontspec_em_prop
+\prop_new:N \g__fontspec_strong_prop
+\tl_new:N \l_fontspec_family_tl
+\tl_new:N \g_fontspec_encoding_tl
+\tl_new:N \l_fontspec_renderer_tl
+\tl_new:N \l_fontspec_fontname_tl
+\tl_new:N \l_fontspec_defined_shapes_tl
+\tl_new:N \UTFencname
+\tl_new:N \cyrillicencoding
+\tl_new:N \latinencoding
+\tl_new:N \g__fontspec_single_feat_tl
+\tl_new:N \l__fontspec_tmp_tl
+\tl_new:N \l__fontspec_size_tl
+\tl_new:N \l__fontspec_sizedfont_tl
+\tl_new:N \l__fontspec_nfss_tl
+\tl_new:N \l__fontspec_nfss_sc_tl
+\tl_new:N \l__fontspec_this_font_tl
+\tl_new:N \l__fontspec_scale_tl
+\tl_new:N \l__fontspec_opacity_tl
+\tl_new:N \l__fontspec_hexcol_tl
+\tl_new:N \l__fontspec_fontid_tl
+\tl_new:N \l__fontspec_extension_tl
+\tl_new:N \l__fontspec_ext_filename_tl
+\tl_new:N \l__fontspec_font_path_tl
+\tl_new:N \l__fontspec_basename_tl
+\tl_new:N \l__fontspec_curr_fontname_tl
+\tl_new:N \l__fontspec_saved_fontname_tl
+\tl_new:N \l__fontspec_optical_size_tl
+\tl_new:N \l__fontspec_ttc_index_tl
+\tl_new:N \l__fontspec_nfss_enc_tl
+\tl_new:N \g__fontspec_curr_series_tl
+\tl_new:N \l__fontspec_options_tl
+\tl_new:N \l__fontspec_fontname_tl
+\tl_new:N \l__fontspec_rawfeatures_sclist
+\tl_new:N \l__fontspec_pre_feat_sclist
+\tl_new:N \g__fontspec_rmfamily_family
+\tl_new:N \g__fontspec_sffamily_family
+\tl_new:N \g__fontspec_ttfamily_family
\tl_new:N \g__fontspec_mathrm_tl
\tl_new:N \g__fontspec_bfmathrm_tl
\tl_new:N \g__fontspec_mathsf_tl
@@ -98,13 +161,6 @@
\tl_new:N \l__fontspec_fontname_sl_tl
\tl_new:N \l__fontspec_fontname_bfsl_tl
\tl_new:N \l__fontspec_fontname_sc_tl
-\tl_new:N \l__fontspec_fontfeat_up_clist
-\tl_new:N \l__fontspec_fontfeat_bf_clist
-\tl_new:N \l__fontspec_fontfeat_it_clist
-\tl_new:N \l__fontspec_fontfeat_bfit_clist
-\tl_new:N \l__fontspec_fontfeat_sl_clist
-\tl_new:N \l__fontspec_fontfeat_bfsl_clist
-\tl_new:N \l__fontspec_fontfeat_sc_clist
\tl_new:N \l__fontspec_script_name_tl
\tl_new:N \l_fontspec_script_tl
\tl_new:N \l__fontspec_lang_name_tl
@@ -114,35 +170,13 @@
\tl_new:N \g__fontspec_opacity_tl
\tl_set:Nn \g__fontspec_hexcol_tl {000000}
\tl_set:Nn \g__fontspec_opacity_tl {FF~}
+\tl_new:N \l__fontspec_punctspace_adjust_tl
+\tl_new:N \l__fontspec_wordspace_adjust_tl
+\tl_new:N \l__fontspec_postadjust_tl
+\tl_new:N \g__fontspec_postadjust_tl
\tl_set:Nn \g__fontspec_postadjust_tl { \l__fontspec_wordspace_adjust_tl \l__fontspec_punctspace_adjust_tl }
-\cs_new:Nn \__fontspec_keys_set_known:nnN
- {
- \keys_set_known:nnN {#1} {#2} #3
- }
-\cs_generate_variant:Nn \__fontspec_keys_set_known:nnN {nx}
-\cs_set:Npn \__fontspec_head_ii:n #1 { \__fontspec_head_ii:w #1 *** \q_stop}
-\cs_set:Npn \__fontspec_head_ii:w #1#2#3 \q_stop { #1#2 }
-\cs_generate_variant:Nn \__fontspec_head_ii:n {o}
-\cs_new:Nn \__fontspec_int_mult_truncate:Nn
- {
- \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
- }
-\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 \prop_put:Nnn {Nxx}
-\cs_generate_variant:Nn \prop_put:Nnn {NxV}
-\cs_generate_variant:Nn \prop_gput_if_new:Nnn {NxV}
-\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
-\cs_generate_variant:Nn \prop_get:NnNT {NxN}
-\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
-\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
-\cs_generate_variant:Nn \tl_if_empty:nF {x}
-\cs_generate_variant:Nn \tl_if_empty:nF {f}
-\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
-\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
+%%^^A%% fontspec-msg.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new:Npn \__fontspec_error:n { \msg_error:nn {fontspec} }
\cs_new:Npn \__fontspec_error:nn { \msg_error:nnn {fontspec} }
\cs_new:Npn \__fontspec_error:nx { \msg_error:nnx {fontspec} }
@@ -373,6 +407,8 @@
* an eight-digit hex colour RRGGBBTT with opacity
}
\char_set_catcode_ignore:n {32}
+
+%%^^A%% fontspec-opening.dtx -- part of FONTSPEC <wspr.io/fontspec>
\DeclareOption{cm-default}
{ \__fontspec_warning:n {cm-default-obsolete} }
\DeclareOption{math}{\bool_set_true:N \g__fontspec_math_bool}
@@ -431,6 +467,34 @@
{
\RequirePackage{xunicode}
}
+\cs_new:Npn \FontspecSetCheckBoolTrue { \bool_set_true:N \l__fontspec_check_bool }
+\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l__fontspec_check_bool }
+\cs_new:Nn \__fontspec_keys_set_known:nnN
+ {
+ \keys_set_known:nnN {#1} {#2} #3
+ }
+\cs_generate_variant:Nn \__fontspec_keys_set_known:nnN {nx}
+\cs_new:Nn \__fontspec_int_mult_truncate:Nn
+ {
+ \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
+ }
+\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 \prop_put:Nnn {Nxx}
+\cs_generate_variant:Nn \prop_put:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput_if_new:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
+\cs_generate_variant:Nn \prop_get:NnNT {NxN}
+\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
+\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {f}
+\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
+\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
+
+%%^^A%% fontspec-fontload.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
{
@@ -473,6 +537,9 @@
{
\tex_hyphenchar:D #1 = #2 \scan_stop:
}
+
+%%^^A%% fontspec-interfaces.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\NewDocumentCommand \fontspec { O{} m O{} }
{
\__fontspec_main_fontspec:nn {#1,#3} {#2}
@@ -569,6 +636,9 @@
{
\__fontspec_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
}
+
+%%^^A%% fontspec-user.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\cs_set:Nn \__fontspec_main_fontspec:nn
{
\fontspec_set_family:Nnn \f@family {#1} {#2}
@@ -718,8 +788,8 @@
{
\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
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {options} \l__fontspec_options_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {fontname} \l__fontspec_fontname_tl
\bool_set_true:N \l__fontspec_disable_defaults_bool
\use:x
{
@@ -847,19 +917,20 @@
}
}
+%%^^A%% fontspec-api.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\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:
+ \cs_if_exist:cTF {g__fontspec_fontinfo_ \f@family _prop} \prg_return_true: \prg_return_false:
}
\prg_new_conditional:Nnn \fontspec_if_aat_feature:nn {TF,T,F}
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_atsui_bool
{
- \__fontspec_make_AAT_feature_string:nnTF {#1}{#2}
+ \__fontspec_make_AAT_feature_string:NnnTF \font {#1} {#2}
\prg_return_true: \prg_return_false:
}
{
@@ -874,9 +945,7 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool \prg_return_true: \prg_return_false:
}
{
@@ -887,21 +956,19 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
\int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
- \prop_get:cnN {g__fontspec_ \f@family _prop} {lang-num} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {lang-num} \l__fontspec_tmp_tl
\int_set:Nn \l__fontspec_language_int {\l__fontspec_tmp_tl}
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l_fontspec_script_tl
- \prop_get:cnN {g__fontspec_ \f@family _prop} {lang-tag} \l_fontspec_lang_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-tag} \l_fontspec_script_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {lang-tag} \l_fontspec_lang_tl
- \__fontspec_check_ot_feat:nTF {#1} {\prg_return_true:} {\prg_return_false:}
+ \__fontspec_check_ot_feat:NnTF \font {#1} {\prg_return_true:} {\prg_return_false:}
}
{
\prg_return_false:
@@ -915,14 +982,12 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
\__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
\__fontspec_iv_str_to_num:Nn \l__fontspec_language_int {#2}
- \__fontspec_check_ot_feat:nTF {#3} \prg_return_true: \prg_return_false:
+ \__fontspec_check_ot_feat:NnTF \font {#3} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -932,12 +997,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \__fontspec_check_script:nTF {#1} \prg_return_true: \prg_return_false:
+ \__fontspec_check_script:NnTF \font {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -947,16 +1010,14 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
- \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l_fontspec_script_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-num} \l__fontspec_tmpf_tl
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmpf_tl}
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-tag} \l_fontspec_script_tl
- \__fontspec_check_lang:nTF {#1} \prg_return_true: \prg_return_false:
+ \__fontspec_check_lang:NnTF \font {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -966,14 +1027,12 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
\tl_set:Nn \l_fontspec_script_tl {#1}
\__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
- \__fontspec_check_lang:nTF {#2} \prg_return_true: \prg_return_false:
+ \__fontspec_check_lang:NnTF \font {#2} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -983,12 +1042,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-tag} \l__fontspec_tmp_tl
\str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
{\prg_return_true:} {\prg_return_false:}
}
@@ -1000,12 +1057,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {lang-tag} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {lang-tag} \l__fontspec_tmp_tl
\str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
{\prg_return_true:} {\prg_return_false:}
}
@@ -1024,7 +1079,7 @@
{
\tl_set:Nn \l__fontspec_family_label_tl { #1 }
\__fontspec_select_font_family:nn {#3}{#4}
- \tl_set_eq:NN #1 \l_fontspec_font
+ \font #1 = \fontname \l_fontspec_font \scan_stop:
\tl_set_eq:NN #2 \l_fontspec_family_tl
}
\prg_new_conditional:Nnn \fontspec_font_if_exist:n {TF,T,F}
@@ -1064,6 +1119,9 @@
}
{ \prg_return_false: }
}
+
+%%^^A%% fontspec-internal.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\cs_new_protected:Nn \__fontspec_select_font_family:nn
{
\group_begin:
@@ -1189,7 +1247,7 @@
\__fontspec_primitive_font_set:Nnn \l_fontspec_font
{ \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
\__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l__fontspec_fontname_up_tl} }
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \l_fontspec_font
\__fontspec_primitive_font_gset:Nnn \l_fontspec_font
{ \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
\l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
@@ -1224,7 +1282,7 @@
{
\tl_if_empty:NTF \l__fontspec_script_name_tl
{
- \__fontspec_check_script:nTF {latn}
+ \__fontspec_check_script:NnTF \l_fontspec_font {latn}
{
\tl_set:Nn \l__fontspec_script_name_tl {Latin}
\tl_if_empty:NT \l__fontspec_lang_name_tl
@@ -1261,7 +1319,7 @@
% \EROROR
}
{
- \bool_if:NT \l__fontspec_atsui_bool
+ \bool_if:nT { \l__fontspec_atsui_bool || \l__fontspec_graphite_bool }
{ \keys_set:nV {fontspec-aat} \l__fontspec_keys_leftover_clist }
}
@@ -1278,11 +1336,17 @@
{
- \cs_if_exist:NT \l__fontspec_nfss_fam_tl
- {
- \cs_set_eq:cN {g__fontspec_UID_\l__fontspec_fontid_tl} \l__fontspec_nfss_fam_tl
- }
- \cs_if_exist:cF {g__fontspec_UID_\l__fontspec_fontid_tl}
+ \tl_if_exist:cF {g__fontspec_UID_\l__fontspec_fontid_tl}
+ {
+ \tl_new:c {g__fontspec_UID_\l__fontspec_fontid_tl}
+ }
+
+ \tl_if_exist:NT \l__fontspec_nfss_fam_tl
+ {
+ \tl_set_eq:cN {g__fontspec_UID_\l__fontspec_fontid_tl} \l__fontspec_nfss_fam_tl
+ }
+
+ \tl_if_empty:cT {g__fontspec_UID_\l__fontspec_fontid_tl}
{
% The font name is fully expanded, in case it's defined in terms of macros, before having its spaces zapped:
\tl_set:Nx \l__fontspec_tmp_tl {#1}
@@ -1298,7 +1362,7 @@
}
}
\tl_gset:Nv \l_fontspec_family_tl {g__fontspec_UID_\l__fontspec_fontid_tl}
- \cs_if_exist:cTF {g__fontspec_ \l_fontspec_family_tl _prop}
+ \cs_if_exist:cTF {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop}
\prg_return_false: \prg_return_true:
}
\cs_new:Nn \__fontspec_save_family:nn
@@ -1311,18 +1375,18 @@
}
\cs_new:Nn \__fontspec_save_fontinfo:n
{
- \prop_new:c {g__fontspec_ \l_fontspec_family_tl _prop}
- \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontname} { #1 }
- \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {options} { \l__fontspec_all_features_clist }
- \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontdef}
+ \prop_new:c {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop}
+ \prop_gput:cnx {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {fontname} { #1 }
+ \prop_gput:cnx {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {options} { \l__fontspec_all_features_clist }
+ \prop_gput:cnx {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {fontdef}
{
\__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl}
{ \l__fontspec_pre_feat_sclist \l__fontspec_rawfeatures_sclist }
}
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-num} \l__fontspec_script_int
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-num} \l__fontspec_language_int
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-tag} \l_fontspec_script_tl
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {script-num} \l__fontspec_script_int
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {lang-num} \l__fontspec_language_int
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {script-tag} \l_fontspec_script_tl
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
}
\cs_new:Nn \__fontspec_find_autofonts:
{
@@ -1380,32 +1444,28 @@
{ {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
}
}
-\cs_new:Nn \__fontspec_set_font_type:
+\cs_new:Nn \__fontspec_set_font_type:N
{
\bool_set_false:N \l__fontspec_tfm_bool
\bool_set_false:N \l__fontspec_atsui_bool
\bool_set_false:N \l__fontspec_ot_bool
\bool_set_false:N \l__fontspec_mm_bool
\bool_set_false:N \l__fontspec_graphite_bool
- \ifcase\XeTeXfonttype\l_fontspec_font
+ \ifcase\XeTeXfonttype #1
\bool_set_true:N \l__fontspec_tfm_bool
\or
\bool_set_true:N \l__fontspec_atsui_bool
- \ifnum\XeTeXcountvariations\l_fontspec_font > \c_zero
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/AAT} }
+ \ifnum\XeTeXcountvariations #1 > \c_zero
\bool_set_true:N \l__fontspec_mm_bool
\fi
\or
\bool_set_true:N \l__fontspec_ot_bool
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/OT} }
+ \or
+ \bool_set_true:N \l__fontspec_graphite_bool
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/GR} }
\fi
- \tl_if_empty:NT \l_fontspec_renderer_tl
- {
- \bool_if:NTF \l__fontspec_atsui_bool
- { \tl_set:Nn \l_fontspec_renderer_tl {/AAT} }
- {
- \bool_if:NT \l__fontspec_ot_bool
- { \tl_set:Nn \l_fontspec_renderer_tl {/OT} }
- }
- }
}
\cs_new:Nn \__fontspec_set_autofont:Nnn
{
@@ -1599,7 +1659,7 @@
}
\cs_set:Nn \__fontspec_make_ot_smallcaps:TF
{
- \__fontspec_check_ot_feat:nTF {smcp} {#1} {#2}
+ \__fontspec_check_ot_feat:NnTF \l_fontspec_font {smcp} {#1} {#2}
}
\cs_set:Nn \__fontspec_make_smallcaps:TF
{
@@ -1607,7 +1667,7 @@
{ \__fontspec_make_ot_smallcaps:TF {#1} {#2} }
{
\bool_if:NT \l__fontspec_atsui_bool
- { \__fontspec_make_AAT_feature_string:nnTF {3}{3} {#1} {#2} }
+ { \__fontspec_make_AAT_feature_string:NnnTF \l_fontspec_font {3}{3} {#1} {#2} }
}
}
\cs_new:Nn \__fontspec_update_featstr:n
@@ -1670,6 +1730,9 @@
}
}
\cs_generate_variant:Nn \__fontspec_iv_str_to_num:Nn {No}
+
+%%^^A%% fontspec-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\cs_new:Nn \__fontspec_define_opentype_feature_group:n
{
\keys_define:nn {fontspec-opentype} { #1 .multichoice: }
@@ -1727,7 +1790,7 @@
\tl_if_empty:nT {#1} { \bool_set_false:N \l__fontspec_check_feat_bool }
\bool_if:NT \l__fontspec_check_feat_bool
{
- \__fontspec_check_ot_feat:nF {#1}
+ \__fontspec_check_ot_feat:NnF \l_fontspec_font {#1}
{
\__fontspec_warning:nx {icu-feature-not-exist-in-font} {#1}
\bool_set_false:N \l__fontspec_proceed_bool
@@ -1746,18 +1809,18 @@
\cs_new:Nn \__fontspec_swap_plus_minus:n { \__fontspec_swap_plus_minus_aux:Nq #1 \q_nil }
\cs_new:Npn \__fontspec_swap_plus_minus_aux:Nq #1#2 \q_nil
{ \str_case:nn {#1} { {+} {-#2} {-} {+#2} } }
-\prg_new_conditional:Nnn \__fontspec_check_script:n {TF}
+\prg_new_conditional:Nnn \__fontspec_check_script:Nn {TF}
{
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
{
- \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#1}
- \int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts \l_fontspec_font }
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#2}
+ \int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts #1 }
\int_zero:N \l_tmpa_int
\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
+ \ifnum \XeTeXOTscripttag #1 \l_tmpa_int = \l__fontspec_strnum_int
\bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
@@ -1767,19 +1830,19 @@
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
}
-\prg_new_conditional:Nnn \__fontspec_check_lang:n {TF}
+\prg_new_conditional:Nnn \__fontspec_check_lang:Nn {TF}
{
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
{
- \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#1}
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#2}
\int_set:Nn \l_tmpb_int
- { \XeTeXOTcountlanguages \l_fontspec_font \l__fontspec_script_int }
+ { \XeTeXOTcountlanguages #1 \l__fontspec_script_int }
\int_zero:N \l_tmpa_int
\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
+ \ifnum\XeTeXOTlanguagetag #1 \l__fontspec_script_int \l_tmpa_int = \l__fontspec_strnum_int
\bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
@@ -1789,23 +1852,23 @@
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
}
-\prg_new_conditional:Nnn \__fontspec_check_ot_feat:n {TF,F}
+\prg_new_conditional:Nnn \__fontspec_check_ot_feat:Nn {TF,F}
{
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
{
\int_set:Nn \l_tmpb_int
{
- \XeTeXOTcountfeatures \l_fontspec_font
+ \XeTeXOTcountfeatures #1
\l__fontspec_script_int
\l__fontspec_language_int
}
- \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#1}
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#2}
\int_zero:N \l_tmpa_int
\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
+ \ifnum\XeTeXOTfeaturetag #1 \l__fontspec_script_int \l__fontspec_language_int
\l_tmpa_int =\l__fontspec_strnum_int
\bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
@@ -1939,6 +2002,8 @@
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vrtr}{Vertical~Alternates~for~Rotation}
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {zero}{Slashed~Zero}
+%%^^A%% fontspec-graphite.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\cs_new:Nn \__fontspec_define_aat_feature_group:n
{ \keys_define:nn {fontspec-aat} { #1 .multichoice: } }
@@ -1955,32 +2020,32 @@
\tl_if_empty:nTF {#1}
{ \__fontspec_warning:n {aat-feature-not-exist} }
{
- \__fontspec_make_AAT_feature_string:nnTF {#1}{#2}
+ \__fontspec_make_AAT_feature_string:NnnTF \l_fontspec_font {#1}{#2}
{
\__fontspec_update_featstr:n {\l_fontspec_feature_string_tl}
}
{ \__fontspec_warning:nx {aat-feature-not-exist-in-font} {#1,#2} }
}
}
-\prg_new_conditional:Nnn \__fontspec_make_AAT_feature_string:nn {TF,T,F}
+\prg_new_conditional:Nnn \__fontspec_make_AAT_feature_string:Nnn {TF,T,F}
{
- \tl_set:Nx \l_tmpa_tl { \XeTeXfeaturename \l_fontspec_font #1 }
+ \tl_set:Nx \l_tmpa_tl { \XeTeXfeaturename #1 #2 }
\tl_if_empty:NTF \l_tmpa_tl
{ \prg_return_false: }
{
- \int_compare:nTF { \XeTeXisexclusivefeature\l_fontspec_font #1 > 0 }
+ \int_compare:nTF { \XeTeXisexclusivefeature #1 #2 > 0 }
{
- \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
+ \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
}
{
- \int_if_even:nTF {#2}
+ \int_if_even:nTF {#3}
{
- \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
+ \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
}
{
\tl_set:Nx \l_tmpb_tl
{
- \XeTeXselectorname\l_fontspec_font #1\space \numexpr#2-1\relax
+ \XeTeXselectorname #1 #2\space \numexpr#3-1\relax
}
\tl_if_empty:NF \l_tmpb_tl { \tl_put_left:Nn \l_tmpb_tl {!} }
}
@@ -1994,6 +2059,8 @@
}
}
+%%^^A%% fontspec-keyval.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\clist_set:Nn \g__fontspec_all_keyval_modules_clist
{
fontspec, fontspec-opentype, fontspec-aat,
@@ -2044,8 +2111,10 @@
{AAT,ICU,OpenType,Graphite,Full,Basic}
{
\int_compare:nTF {\l_keys_choice_int <= 4} {
- \tl_set:Nv \l_fontspec_renderer_tl
- { g_fontspec_renderer_tag_ \l_keys_choice_tl }
+ \tl_set:Nx \l_fontspec_renderer_tl
+ {
+ \int_case:nn \l_keys_choice_int { 1 {/AAT} 2 {/OT} 3 {/OT} 4 {/GR} }
+ }
\tl_gset:Nx \g__fontspec_single_feat_tl { \l_fontspec_renderer_tl }
}
{
@@ -2053,12 +2122,6 @@
}
}
}
-\tl_set:cn {g_fontspec_renderer_tag_AAT} {/AAT}
-\tl_set:cn {g_fontspec_renderer_tag_ICU} {/OT}
-\tl_set:cn {g_fontspec_renderer_tag_OpenType} {/OT}
-\tl_set:cn {g_fontspec_renderer_tag_Graphite} {/GR}
-\tl_set:cn {g_fontspec_mode_tag_Full} {node}
-\tl_set:cn {g_fontspec_mode_tag_Basic} {base}
\__fontspec_keys_define_code:nnn {fontspec-preparse} {Script}
{
\keys_set:nn {fontspec-renderer} {Renderer=OpenType}
@@ -2222,7 +2285,7 @@
\tl_set:Nx \l__fontspec_nfss_fam_tl { #1 }
\cs_undefine:c {g__fontspec_UID_\l__fontspec_fontid_tl}
\tl_if_exist:NT \l_fontspec_family_tl
- { \cs_undefine:c {g__fontspec_ \l_fontspec_family_tl _prop} }
+ { \cs_undefine:c {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} }
}
\__fontspec_keys_define_code:nnn {fontspec} {FontFace}
{
@@ -2522,6 +2585,8 @@
\__fontspec_update_featstr:n {#1}
}
+%%^^A%% fontspec-feat-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\__fontspec_feat_prop_add:nn {salt} { Alternate\,=\,$N$ }
\__fontspec_feat_prop_add:nn {nalt} { Annotation\,=\,$N$ }
\__fontspec_feat_prop_add:nn {ornm} { Ornament\,=\,$N$ }
@@ -2783,7 +2848,7 @@
\bool_set_false:N \l__fontspec_script_exist_bool
\clist_map_inline:nn {#2}
{
- \__fontspec_check_script:nTF {####1}
+ \__fontspec_check_script:NnTF \l_fontspec_font {####1}
{
\tl_set:Nn \l_fontspec_script_tl {####1}
\int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
@@ -2800,7 +2865,7 @@
\__fontspec_warning:nx {script-not-exist} {#1}
}
{
- \__fontspec_check_script:nTF {latn}
+ \__fontspec_check_script:NnTF \l_fontspec_font {latn}
{
\__fontspec_warning:nx {script-not-exist-latn} {#1}
\tl_set:Nn \l_fontspec_script_tl {latn}
@@ -2817,7 +2882,7 @@
\cs_new:Nn \fontspec_new_lang:nn
{
\keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
- \__fontspec_check_lang:nTF {#2}
+ \__fontspec_check_lang:NnTF \l_fontspec_font {#2}
{
\tl_set:Nn \l_fontspec_lang_tl {#2}
\int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
@@ -2839,14 +2904,14 @@
{
Language / Turkish .code:n =
{
- \__fontspec_check_lang:nTF {TRK}
+ \__fontspec_check_lang:NnTF \l_fontspec_font {TRK}
{
\int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
\tl_set:Nn \l_fontspec_lang_tl {TRK}
\tl_gset:Nn \g__fontspec_single_feat_tl { language=TRK }
}
{
- \__fontspec_check_lang:nTF {TUR}
+ \__fontspec_check_lang:NnTF \l_fontspec_font {TUR}
{
\int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
\tl_set:Nn \l_fontspec_lang_tl {TUR}
@@ -2881,6 +2946,8 @@
\__fontspec_ot_compat:nn {Diacritics} {AboveBase}
\__fontspec_ot_compat:nn {Diacritics} {BelowBase}
+%%^^A%% fontspec-scripts.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\newfontscript{Adlam}{adlm}
\newfontscript{Ahom}{ahom}
\newfontscript{Anatolian~Hieroglyphs}{hluw}
@@ -3026,6 +3093,8 @@
\newfontscript{N'ko}{nko~}
\newfontscript{Oriya}{ory2,orya}
+%%^^A%% fontspec-lang.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\newfontlanguage{Abaza}{ABA}
\newfontlanguage{Abkhazian}{ABK}
\newfontlanguage{Adyghe}{ADY}
@@ -3409,6 +3478,8 @@
\newfontlanguage{Zande}{ZND}
\newfontlanguage{Zulu}{ZUL}
+%%^^A%% fontspec-feat-aat.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\__fontspec_define_aat_feature_group:n {Ligatures}
\__fontspec_define_aat_feature:nnnn {Ligatures} {Required} {1} {0}
@@ -3548,6 +3619,8 @@
\__fontspec_define_aat_feature:nnnn {Annotation} {BlackRoundSquare} {24} {10}
\__fontspec_define_aat_feature:nnnn {Annotation} {DoubleCircle} {24} {11}
+%%^^A%% fontspec-enc.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\providecommand\UnicodeFontFile[2]{"[#1]:#2"}
\providecommand\UnicodeFontName[2]{"#1:#2"}
\providecommand\UnicodeFontTeXLigatures{mapping=tex-text;}
@@ -3616,7 +3689,18 @@
{ \__fontspec_error:nn {only-inside-encdef} \UndeclareSymbol }
\UndeclareTextCommand {#1} {\UnicodeEncodingName}
}
-
+\DeclareDocumentCommand \UndeclareAccent {m}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \UndeclareAccent }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
+\DeclareDocumentCommand \UndeclareCommand {m}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \UndeclareCommand }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
\DeclareDocumentCommand \UndeclareComposite {mm}
{
\bool_if:NF \l__fontspec_defining_encoding_bool
@@ -3624,6 +3708,8 @@
\cs_undefine:c
{ \c_backslash_str \UnicodeEncodingName \token_to_str:N #1 - \tl_to_str:n {#2} }
}
+
+%%^^A%% fontspec-math.dtx -- part of FONTSPEC <wspr.io/fontspec>
\@ifpackageloaded{euler}
{
\bool_set_true:N \g__fontspec_pkg_euler_loaded_bool
@@ -3759,12 +3845,17 @@
}
}
\AtBeginDocument{\fontspec_maybe_setup_maths:}
+
+%%^^A%% fontspec-closing.dtx -- part of FONTSPEC <wspr.io/fontspec>
\bool_if:NT \g__fontspec_cfg_bool
{
\InputIfFileExists{fontspec.cfg}
{}
{\typeout{No~ fontspec.cfg~ file~ found;~ no~ configuration~ loaded.}}
}
+
+%%^^A%% fontspec-xfss.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\providecommand*\itscdefault{\itdefault\scdefault}
\providecommand*\slscdefault{\sldefault\scdefault}
\DeclareRobustCommand{\sishape}
@@ -3922,6 +4013,9 @@
\cs_new:Nn \fontspec_set_strong_level:n { \int_set:Nn \l__fontspec_strong_int {#1} }
\strongfontdeclare{ \bfseries }
\emfontdeclare{ \emshape, \eminnershape }
+
+%%^^A%% fontspec-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\DeclareRobustCommand{\-}
{
\discretionary
@@ -4022,16 +4116,4 @@
{
{ \addfontfeature{Numbers=Lining} #1 }
}
-%% ------------------------------------------------
-%% Copyright 2004--2017 Will Robertson <will.robertson@latex-project.org>
-%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
-%%
-%% Distributable under the LaTeX Project Public License, version 1.3c or higher.
-%% The latest version of this license is at: http://www.latex-project.org/lppl.txt
-%%
-%% This work is "maintained" by Will Robertson.
-%% It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
-%% And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
-%% ------------------------------------------------
-%%
-%% End of file `fontspec-xetex.sty'.
+