| 1 |
%%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC <latex3.github.io/fontspec> |
| 2 |
% |
| 3 |
% \section{Variables} |
| 4 |
% |
| 5 |
% \begin{variable}{\l_@@_firsttime_bool} |
| 6 |
% As \cs{keys_set:nn} is run multiple times, some of its |
| 7 |
% information storing only occurs once while we decide if the font family |
| 8 |
% has been defined or not. When the later processing is occurring per-shape |
| 9 |
% this no longer needs to happen; this is indicated by the `firsttime' |
| 10 |
% conditional. |
| 11 |
% \end{variable} |
| 12 |
% |
| 13 |
% \begin{variable}{\l_@@_never_check_bool} |
| 14 |
% Used to disable checking opentype script, language, and tags |
| 15 |
% when running checking code that has a user-defined return path we want to allow the higher-level |
| 16 |
% code to dictate the logic. |
| 17 |
% TODO: tidy this up! |
| 18 |
% \end{variable} |
| 19 |
% |
| 20 |
% \section{Implementation} |
| 21 |
% |
| 22 |
% \iffalse |
| 23 |
% \begin{macrocode} |
| 24 |
%<@@=fontspec> |
| 25 |
% \end{macrocode} |
| 26 |
% \fi |
| 27 |
% |
| 28 |
% This file consists solely of declaration of variables used by \pkg{fontspec}. |
| 29 |
% In some cases these variables are also initialised with default values. |
| 30 |
% |
| 31 |
% \paragraph{Booleans for package options} |
| 32 |
% |
| 33 |
% For package options: |
| 34 |
% \begin{macrocode} |
| 35 |
%<*options> |
| 36 |
\bool_new:N \g_@@_cfg_bool |
| 37 |
\bool_new:N \g_@@_math_bool |
| 38 |
%</options> |
| 39 |
%<*fontspec> |
| 40 |
% \end{macrocode} |
| 41 |
% |
| 42 |
% \paragraph{Booleans for flow control} |
| 43 |
% |
| 44 |
% \begin{macro}{\l_@@_firsttime_bool} |
| 45 |
% \begin{macrocode} |
| 46 |
\bool_new:N \l_@@_firsttime_bool |
| 47 |
% \end{macrocode} |
| 48 |
% \end{macro} |
| 49 |
% |
| 50 |
% \begin{macro}{\l_@@_never_check_bool} |
| 51 |
% \begin{macrocode} |
| 52 |
\bool_new:N \l_@@_never_check_bool |
| 53 |
% \end{macrocode} |
| 54 |
% \end{macro} |
| 55 |
% |
| 56 |
% \paragraph{Booleans for processing logic} |
| 57 |
% |
| 58 |
% \begin{macrocode} |
| 59 |
\bool_new:N \l_@@_nobf_bool |
| 60 |
\bool_new:N \l_@@_noit_bool |
| 61 |
\bool_new:N \l_@@_nosc_bool |
| 62 |
\bool_new:N \l_@@_check_bool |
| 63 |
% \end{macrocode} |
| 64 |
% |
| 65 |
% \begin{macrocode} |
| 66 |
\bool_new:N \l_@@_tfm_bool |
| 67 |
\bool_new:N \l_@@_atsui_bool |
| 68 |
\bool_new:N \l_@@_ot_bool |
| 69 |
\bool_new:N \l_@@_mm_bool |
| 70 |
\bool_new:N \l_@@_harfbuzz_bool |
| 71 |
\bool_new:N \l_@@_graphite_bool |
| 72 |
\bool_new:N \l_@@_fontcfg_bool |
| 73 |
\bool_set_true:N \l_@@_fontcfg_bool |
| 74 |
% \end{macrocode} |
| 75 |
% For dealing with legacy maths: |
| 76 |
% \begin{macrocode} |
| 77 |
\bool_new:N \g_@@_math_euler_bool |
| 78 |
\bool_new:N \g_@@_math_lucida_bool |
| 79 |
\bool_new:N \g_@@_pkg_euler_loaded_bool |
| 80 |
% \end{macrocode} |
| 81 |
% |
| 82 |
% \begin{macrocode} |
| 83 |
\bool_new:N \l_@@_tmpa_bool |
| 84 |
\bool_new:N \l_@@_disable_defaults_bool |
| 85 |
\bool_new:N \l_@@_alias_bool |
| 86 |
\bool_new:N \l_@@_external_bool |
| 87 |
\bool_new:N \l_@@_defining_encoding_bool |
| 88 |
\bool_new:N \l_@@_scriptlang_exist_bool |
| 89 |
\bool_new:N \g_@@_em_normalise_slant_bool |
| 90 |
\bool_new:N \l_@@_external_kpse_bool |
| 91 |
% \end{macrocode} |
| 92 |
% |
| 93 |
% |
| 94 |
% \paragraph{Counters} |
| 95 |
% \begin{macrocode} |
| 96 |
\int_new:N \l_@@_script_int |
| 97 |
\int_new:N \l_@@_language_int |
| 98 |
\int_new:N \l_@@_strnum_int |
| 99 |
\int_new:N \l_@@_tmp_int |
| 100 |
\int_new:N \l_@@_tmpa_int |
| 101 |
\int_new:N \l_@@_tmpb_int |
| 102 |
\int_new:N \l_@@_tmpc_int |
| 103 |
\int_new:N \l_@@_em_int |
| 104 |
\int_new:N \l_@@_emdef_int |
| 105 |
\int_new:N \l_@@_strong_int |
| 106 |
\int_new:N \l_@@_strongdef_int |
| 107 |
% \end{macrocode} |
| 108 |
% |
| 109 |
% \paragraph{Floats} |
| 110 |
% \begin{macrocode} |
| 111 |
\fp_new:N \l_@@_tmpa_fp |
| 112 |
\fp_new:N \l_@@_tmpb_fp |
| 113 |
% \end{macrocode} |
| 114 |
% |
| 115 |
% \paragraph{Dimensions} |
| 116 |
% \begin{macrocode} |
| 117 |
\dim_new:N \l_@@_tmpa_dim |
| 118 |
\dim_new:N \l_@@_tmpb_dim |
| 119 |
\dim_new:N \l_@@_tmpc_dim |
| 120 |
% \end{macrocode} |
| 121 |
% |
| 122 |
% \paragraph{Sequences} |
| 123 |
% \begin{macrocode} |
| 124 |
\seq_new:N \l_@@_bf_series_seq |
| 125 |
% \end{macrocode} |
| 126 |
% |
| 127 |
% \paragraph{Comma-lists} |
| 128 |
% \begin{macrocode} |
| 129 |
\clist_new:N \g_@@_default_fontopts_clist |
| 130 |
\clist_new:N \g_@@_all_keyval_modules_clist |
| 131 |
\clist_new:N \l_@@_sizefeat_clist |
| 132 |
\clist_set:Nn \l_@@_sizefeat_clist {Size={-}} |
| 133 |
\clist_new:N \l_@@_extensions_clist |
| 134 |
\clist_new:N \l_@@_fontopts_clist |
| 135 |
\clist_new:N \l_@@_family_fontopts_clist |
| 136 |
\clist_new:N \l_@@_all_features_clist |
| 137 |
\clist_new:N \l_@@_leftover_clist |
| 138 |
\clist_new:N \l_@@_keys_leftover_clist |
| 139 |
\clist_new:N \l_@@_sizing_leftover_clist |
| 140 |
\clist_new:N \l_@@_fontfeat_clist |
| 141 |
\clist_new:N \l_@@_fontfeat_curr_clist |
| 142 |
\clist_new:N \l_@@_arg_clist |
| 143 |
\clist_new:N \l_@@_this_feat_clist |
| 144 |
% \end{macrocode} |
| 145 |
% |
| 146 |
% \begin{macrocode} |
| 147 |
\clist_new:N \l_@@_fontfeat_up_clist |
| 148 |
\clist_new:N \l_@@_fontfeat_bf_clist |
| 149 |
\clist_new:N \l_@@_fontfeat_it_clist |
| 150 |
\clist_new:N \l_@@_fontfeat_bfit_clist |
| 151 |
\clist_new:N \l_@@_fontfeat_sl_clist |
| 152 |
\clist_new:N \l_@@_fontfeat_bfsl_clist |
| 153 |
\clist_new:N \l_@@_fontfeat_sw_clist |
| 154 |
\clist_new:N \l_@@_fontfeat_bfsw_clist |
| 155 |
\clist_new:N \l_@@_fontfeat_sc_clist |
| 156 |
% \end{macrocode} |
| 157 |
% |
| 158 |
% \paragraph{Property lists} |
| 159 |
% \begin{macrocode} |
| 160 |
\prop_new:N \g_@@_fontopts_prop |
| 161 |
\prop_new:N \l_@@_nfss_prop |
| 162 |
\prop_new:N \l_@@_nfssfont_prop |
| 163 |
\prop_new:N \g_@@_OT_features_prop |
| 164 |
\prop_new:N \g_@@_all_opentype_feature_names_prop |
| 165 |
\prop_new:N \g_@@_em_prop |
| 166 |
\prop_new:N \g_@@_strong_prop |
| 167 |
\prop_new:N \g_@@_fontid_family_prop |
| 168 |
\prop_new:N \g_@@_family_int_prop |
| 169 |
\prop_new:N \g_@@_rawvariations_prop |
| 170 |
% \end{macrocode} |
| 171 |
% |
| 172 |
% \paragraph{Token lists} |
| 173 |
% |
| 174 |
% \paragraph{Visible (perhaps?)} |
| 175 |
% |
| 176 |
% \begin{macrocode} |
| 177 |
\tl_new:N \l_fontspec_family_tl |
| 178 |
\tl_new:N \g_fontspec_encoding_tl |
| 179 |
\tl_new:N \l_fontspec_fontname_tl |
| 180 |
% \end{macrocode} |
| 181 |
% |
| 182 |
% \paragraph{2e interactions} |
| 183 |
% |
| 184 |
% \begin{macrocode} |
| 185 |
\tl_clear_new:N \UTFencname |
| 186 |
\tl_clear_new:N \cyrillicencoding |
| 187 |
\tl_clear_new:N \latinencoding |
| 188 |
% \end{macrocode} |
| 189 |
% |
| 190 |
% \paragraph{Renderer/shaper} |
| 191 |
% |
| 192 |
% \begin{macrocode} |
| 193 |
\tl_new:N \l_@@_renderer_tl |
| 194 |
\tl_new:N \l_@@_mode_tl |
| 195 |
\tl_new:N \l_@@_shaper_tl |
| 196 |
% \end{macrocode} |
| 197 |
% |
| 198 |
% \begin{macrocode} |
| 199 |
\tl_new:N \g_@@_defined_shapes_tl |
| 200 |
\tl_new:N \g_@@_single_feat_tl |
| 201 |
\tl_new:N \l_@@_basename_tl |
| 202 |
\tl_new:N \g_@@_curr_series_tl |
| 203 |
\tl_new:N \l_@@_curr_fontname_tl |
| 204 |
\tl_new:N \l_@@_curr_bfname_tl |
| 205 |
\tl_new:N \l_@@_ext_filename_tl |
| 206 |
\tl_new:N \l_@@_extension_tl |
| 207 |
\tl_new:N \l_@@_font_path_tl |
| 208 |
\tl_new:N \l_@@_fontid_tl |
| 209 |
\tl_new:N \l_@@_fontname_tl |
| 210 |
\tl_new:N \l_@@_options_tl |
| 211 |
\tl_new:N \l_@@_saved_fontname_tl |
| 212 |
\tl_new:N \l_@@_prev_unicode_name_tl |
| 213 |
% \end{macrocode} |
| 214 |
% |
| 215 |
% \begin{macrocode} |
| 216 |
\tl_new:N \g_@@_nfss_enc_tl |
| 217 |
\tl_new:N \g_@@_nfss_family_tl |
| 218 |
\tl_new:N \l_@@_nfss_sc_tl |
| 219 |
\tl_new:N \l_@@_nfss_tl |
| 220 |
\tl_new:N \l_@@_nfss_fam_tl |
| 221 |
% \end{macrocode} |
| 222 |
% |
| 223 |
% \begin{macrocode} |
| 224 |
\tl_new:N \l_@@_size_tl |
| 225 |
\tl_new:N \l_@@_sizedfont_tl |
| 226 |
\tl_new:N \l_@@_this_font_tl |
| 227 |
\tl_new:N \l_@@_ttc_index_tl |
| 228 |
\tl_new:N \l_@@_smcp_shape_tl |
| 229 |
% \end{macrocode} |
| 230 |
% |
| 231 |
% \paragraph{EM and STRONG} |
| 232 |
% \begin{macrocode} |
| 233 |
\tl_new:N \l_@@_emshape_query_tl |
| 234 |
\tl_new:N \l_@@_em_switch_tl |
| 235 |
\tl_new:N \l_@@_strong_switch_tl |
| 236 |
% \end{macrocode} |
| 237 |
% |
| 238 |
% \paragraph{Scratch variables} |
| 239 |
% \begin{macrocode} |
| 240 |
\tl_new:N \l_@@_tmp_tl |
| 241 |
\tl_new:N \l_@@_tmpa_tl |
| 242 |
\tl_new:N \l_@@_tmpb_tl |
| 243 |
\tl_new:N \l_@@_em_tmp_tl |
| 244 |
\tl_new:N \l_@@_strong_tmp_tl |
| 245 |
% \end{macrocode} |
| 246 |
% |
| 247 |
% \paragraph{Maths fonts} |
| 248 |
% \begin{macrocode} |
| 249 |
\tl_new:N \g_@@_mathrm_tl |
| 250 |
\tl_new:N \g_@@_bfmathrm_tl |
| 251 |
\tl_new:N \g_@@_mathsf_tl |
| 252 |
\tl_new:N \g_@@_mathtt_tl |
| 253 |
% \end{macrocode} |
| 254 |
% |
| 255 |
% Defaults: (these are set elsewhere; TODO: check if redundant) |
| 256 |
% \begin{macrocode} |
| 257 |
\tl_gset:Nn \g_@@_mathrm_tl {\rmdefault} |
| 258 |
\tl_gset:Nn \g_@@_mathsf_tl {\sfdefault} |
| 259 |
\tl_gset:Nn \g_@@_mathtt_tl {\ttdefault} |
| 260 |
% \end{macrocode} |
| 261 |
% |
| 262 |
% \begin{macrocode} |
| 263 |
\tl_new:N \l_@@_family_label_tl |
| 264 |
\tl_new:N \l_@@_fake_slant_tl |
| 265 |
\tl_new:N \l_@@_fake_embolden_tl |
| 266 |
% \end{macrocode} |
| 267 |
% |
| 268 |
% \paragraph{Internal font names} |
| 269 |
% \begin{macrocode} |
| 270 |
\tl_new:N \l_@@_fontname_up_tl |
| 271 |
\tl_new:N \l_@@_fontname_bf_tl |
| 272 |
\tl_new:N \l_@@_fontname_it_tl |
| 273 |
\tl_new:N \l_@@_fontname_bfit_tl |
| 274 |
\tl_new:N \l_@@_fontname_sl_tl |
| 275 |
\tl_new:N \l_@@_fontname_bfsl_tl |
| 276 |
\tl_new:N \l_@@_fontname_sw_tl |
| 277 |
\tl_new:N \l_@@_fontname_bfsw_tl |
| 278 |
\tl_new:N \l_@@_fontname_sc_tl |
| 279 |
% \end{macrocode} |
| 280 |
% |
| 281 |
% \paragraph{Script and Language} |
| 282 |
% |
| 283 |
% \begin{macrocode} |
| 284 |
\tl_new:N \l_@@_script_tl |
| 285 |
\tl_new:N \l_@@_script_name_tl |
| 286 |
\tl_set:Nn \l_@@_script_name_tl {CustomDefault} |
| 287 |
% \end{macrocode} |
| 288 |
% |
| 289 |
% \begin{macrocode} |
| 290 |
\tl_new:N \l_@@_lang_tl |
| 291 |
\tl_new:N \l_@@_lang_name_tl |
| 292 |
\tl_set:Nn \l_@@_lang_name_tl {Default} |
| 293 |
% \end{macrocode} |
| 294 |
% |
| 295 |
% \paragraph{Generic font features} |
| 296 |
% |
| 297 |
% \begin{macrocode} |
| 298 |
\tl_new:N \l_@@_scale_tl |
| 299 |
\tl_new:N \l_@@_hyphenchar_tl |
| 300 |
\tl_new:N \l_@@_hexcol_tl |
| 301 |
\tl_new:N \l_@@_opacity_tl |
| 302 |
\tl_new:N \l_@@_optical_size_tl |
| 303 |
\tl_new:N \l_@@_mapping_tl |
| 304 |
\tl_new:N \l_@@_punctspace_adjust_tl |
| 305 |
\tl_new:N \l_@@_wordspace_adjust_tl |
| 306 |
\tl_new:N \l_@@_postadjust_tl |
| 307 |
\tl_new:N \g_@@_instance_tl |
| 308 |
% \end{macrocode} |
| 309 |
% |
| 310 |
% \begin{macrocode} |
| 311 |
\tl_const:Nn \c_@@_hexcol_tl {000000} |
| 312 |
%<XE> \tl_const:Nn \c_@@_opacity_tl {FF~} |
| 313 |
%<LU> \tl_const:Nn \c_@@_opacity_tl {} |
| 314 |
\tl_const:Nn \c_@@_postadjust_tl { \l_@@_wordspace_adjust_tl \l_@@_punctspace_adjust_tl } |
| 315 |
% \end{macrocode} |
| 316 |
% |
| 317 |
% \paragraph{Semi-colon-lists} |
| 318 |
% Not a real data structure but sensible to name accordingly. |
| 319 |
% \begin{macrocode} |
| 320 |
\tl_new:N \g_@@_rawfeatures_sclist |
| 321 |
\tl_new:N \l_@@_pre_feat_sclist |
| 322 |
% \end{macrocode} |
| 323 |
% |
| 324 |
% \paragraph{Font families} |
| 325 |
% \begin{macrocode} |
| 326 |
\tl_new:N \l_@@_rmfamily_family_tl |
| 327 |
\tl_new:N \l_@@_sffamily_family_tl |
| 328 |
\tl_new:N \l_@@_ttfamily_family_tl |
| 329 |
\tl_new:N \l_@@_rmfamily_encoding_tl |
| 330 |
\tl_new:N \l_@@_sffamily_encoding_tl |
| 331 |
\tl_new:N \l_@@_ttfamily_encoding_tl |
| 332 |
% \end{macrocode} |
| 333 |
% |
| 334 |
% |
| 335 |
% |
| 336 |
% \iffalse |
| 337 |
% \begin{macrocode} |
| 338 |
%</fontspec> |
| 339 |
% \end{macrocode} |
| 340 |
% \fi |
| 341 |
|
| 342 |
|
| 343 |
\endinput |
| 344 |
|
| 345 |
% /© |
| 346 |
% ------------------------------------------------ |
| 347 |
% The FONTSPEC package <latex3.github.io/fontspec> |
| 348 |
% ------------------------------------------------ |
| 349 |
% Copyright 2022-2025 The LaTeX project, LPPL "maintainer" |
| 350 |
% Copyright 2004-2022 Will Robertson |
| 351 |
% Copyright 2009-2015 Khaled Hosny |
| 352 |
% Copyright 2013 Philipp Gesang |
| 353 |
% Copyright 2013-2016 Joseph Wright |
| 354 |
% ------------------------------------------------ |
| 355 |
% This package is free software and may be redistributed and/or modified under |
| 356 |
% the conditions of the LaTeX Project Public License, version 1.3c or higher |
| 357 |
% (your choice): <http://www.latex-project.org/lppl/>. |
| 358 |
% ------------------------------------------------ |
| 359 |
% ©/ |