summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx
blob: ea35f1d36087e8c7c134de8ba00a13f0296413d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
%
% \section{Declaration of variables and functions}
%
%    \begin{macrocode}
%<*fontspec>
%    \end{macrocode}
%
% \paragraph{Booleans}
% \subparagraph{firsttime} As \cs{keys_set:nn} is run multiple times, some of its
% information storing only occurs once while we decide if the font family
% has been defined or not. When the later processing is occuring per-shape
% this no longer needs to happen; this is indicated by the `firsttime'
% conditional.
%    \begin{macrocode}
\bool_new:N \l_@@_firsttime_bool
%    \end{macrocode}
%    \begin{macrocode}
\bool_new:N \l_@@_nobf_bool
\bool_new:N \l_@@_noit_bool
\bool_new:N \l_@@_nosc_bool
%    \end{macrocode}
% These strange set functions are to simplify returning code from LuaTeX:
%    \begin{macrocode}
\bool_new:N \l_@@_check_bool
\cs_new:Npn \FontspecSetCheckBoolTrue  { \bool_set_true:N  \l_@@_check_bool }
\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l_@@_check_bool }
%    \end{macrocode}
%
%    \begin{macrocode}
\bool_new:N \l_@@_tfm_bool
\bool_new:N \l_@@_atsui_bool
\bool_new:N \l_@@_ot_bool
\bool_new:N \l_@@_mm_bool
\bool_new:N \l_@@_graphite_bool
%    \end{macrocode}
% For dealing with legacy maths:
%    \begin{macrocode}
\bool_new:N \g_@@_math_euler_bool
\bool_new:N \g_@@_math_lucida_bool
\bool_new:N \g_@@_pkg_euler_loaded_bool
%    \end{macrocode}
% For package options:
%    \begin{macrocode}
\bool_new:N \g_@@_cfg_bool
\bool_new:N \g_@@_math_bool
\bool_new:N \g_@@_euenc_bool
%    \end{macrocode}
%
%    \begin{macrocode}
\bool_new:N \l_@@_disable_defaults_bool
\bool_new:N \l_@@_alias_bool
\bool_new:N \l_@@_external_bool
\bool_new:N \l_@@_never_check_bool
\bool_new:N \l_@@_defining_encoding_bool
\bool_new:N \l_@@_script_exist_bool
%    \end{macrocode}
%
% \paragraph{Counters}
%    \begin{macrocode}
\int_new:N \l_@@_script_int
\int_new:N \l_@@_language_int
\int_new:N \l_@@_strnum_int
\int_new:N \l_@@_tmp_int
\int_new:N \l_@@_em_int
\int_new:N \l_@@_emdef_int
%    \end{macrocode}
%
% \paragraph{Floating point}
%    \begin{macrocode}
\fp_new:N \l_@@_tmpa_fp
\fp_new:N \l_@@_tmpb_fp
%    \end{macrocode}
%
% \paragraph{Dimensions}
%    \begin{macrocode}
\dim_new:N \l_@@_tmpa_dim
\dim_new:N \l_@@_tmpb_dim
\dim_new:N \l_@@_tmpc_dim
\seq_new:N \g_@@_bf_series_seq
%    \end{macrocode}
%
% \paragraph{Comma lists}
%    \begin{macrocode}
\clist_new:N \g_@@_default_fontopts_clist
\clist_new:N \g_@@_all_keyval_modules_clist
\clist_set:Nn \l_@@_sizefeat_clist {Size={-}}
%    \end{macrocode}
%
% \paragraph{Property lists}
%    \begin{macrocode}
\prop_new:N \g_@@_fontopts_prop
\prop_new:N \l_@@_nfss_prop
\prop_new:N \l_@@_nfssfont_prop
\prop_new:N \g_@@_OT_features_prop
\prop_new:N \g_@@_all_opentype_feature_names_prop
\prop_new:N \g_@@_em_prop
%    \end{macrocode}
%
% \paragraph{Token lists}
%
%    \begin{macrocode}
\tl_new:N \g_@@_mathrm_tl
\tl_new:N \g_@@_bfmathrm_tl
\tl_new:N \g_@@_mathsf_tl
\tl_new:N \g_@@_mathtt_tl
%    \end{macrocode}
%
%    \begin{macrocode}
\tl_new:N \l_@@_family_label_tl
\tl_new:N \l_@@_fake_slant_tl
\tl_new:N \l_@@_fake_embolden_tl
%    \end{macrocode}
%
%    \begin{macrocode}
\tl_new:N \l_@@_fontname_up_tl
\tl_new:N \l_@@_fontname_bf_tl
\tl_new:N \l_@@_fontname_it_tl
\tl_new:N \l_@@_fontname_bfit_tl
\tl_new:N \l_@@_fontname_sl_tl
\tl_new:N \l_@@_fontname_bfsl_tl
\tl_new:N \l_@@_fontname_sc_tl
%    \end{macrocode}
%
%    \begin{macrocode}
\tl_new:N \l_@@_fontfeat_up_clist
\tl_new:N \l_@@_fontfeat_bf_clist
\tl_new:N \l_@@_fontfeat_it_clist
\tl_new:N \l_@@_fontfeat_bfit_clist
\tl_new:N \l_@@_fontfeat_sl_clist
\tl_new:N \l_@@_fontfeat_bfsl_clist
\tl_new:N \l_@@_fontfeat_sc_clist
%    \end{macrocode}
%
%    \begin{macrocode}
\tl_new:N \l_@@_script_name_tl
\tl_new:N \l_fontspec_script_tl
\tl_new:N \l_@@_lang_name_tl
\tl_new:N \l_fontspec_lang_tl
%    \end{macrocode}
%
%    \begin{macrocode}
\tl_new:N  \g_@@_hexcol_tl
\tl_new:N  \g_@@_opacity_tl
\tl_set:Nn \g_@@_hexcol_tl {000000}
\tl_set:Nn \g_@@_opacity_tl {FF~}
\tl_set:Nn \g_@@_postadjust_tl { \l_@@_wordspace_adjust_tl \l_@@_punctspace_adjust_tl }
%    \end{macrocode}
%
%
%
% \subsection{Generic functions}
%
% \begin{macro}{\@@_keys_set_known:nnN}
%    \begin{macrocode}
\cs_new:Nn \@@_keys_set_known:nnN
  {
%<debug>  \typeout{:::: Keys~set:~{#1}~{#2} }
    \keys_set_known:nnN {#1} {#2} #3
%<debug>  \typeout{:::: Leftover:~{#3} }
  }
\cs_generate_variant:Nn \@@_keys_set_known:nnN {nx}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_head_ii:n}
% Expands to the first two \meta{items} of |#1|.
%    \begin{macrocode}
\cs_set:Npn \@@_head_ii:n #1 { \@@_head_ii:w #1 *** \q_stop}
\cs_set:Npn \@@_head_ii:w #1#2#3 \q_stop { #1#2 }
\cs_generate_variant:Nn \@@_head_ii:n {o}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_int_mult_truncate:Nn}
% Missing in expl3, IMO.
%    \begin{macrocode}
\cs_new:Nn \@@_int_mult_truncate:Nn
  {
    \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
  }
%    \end{macrocode}
% \end{macro}
%
%
% \subsection{expl3 variants}
%
%    \begin{macrocode}
\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}
%    \end{macrocode}
%
%    \begin{macrocode}
%</fontspec>
%    \end{macrocode}