summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-07-16 20:50:34 +0000
committerKarl Berry <karl@freefriends.org>2017-07-16 20:50:34 +0000
commit1d94e11374efd2df67fc1f555b35b0ba661edb94 (patch)
treed67b06cfc3cecdc5ed27f8e1b9160ff8b4382d88 /Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
parent71e75f5809b91f87b0008504ab8e6e2516e84ca1 (diff)
fontspec (16jul17)
git-svn-id: svn://tug.org/texlive/trunk@44820 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx')
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx35
1 files changed, 29 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
index f81e1680d5b..9b2516cf26a 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
@@ -15,7 +15,7 @@
\clist_set:Nn \g_@@_all_keyval_modules_clist
{
fontspec, fontspec-opentype, fontspec-aat,
- fontspec-preparse, fontspec-preparse-external, fontspec-preparse-nested,
+ fontspec-preparse, fontspec-preparse-cfg, fontspec-preparse-external, fontspec-preparse-nested,
fontspec-renderer
}
% \end{macrocode}
@@ -40,6 +40,18 @@
%
% These features are extracted from the font feature list before all others.
%
+% \paragraph{Don't load font config file}
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-cfg} {IgnoreFontspecFile}
+ {
+ \bool_set_false:N \l_@@_fontcfg_bool
+ }
+\@@_keys_define_code:nnn {fontspec-preparse-external} {NoFontCfg}
+ {
+ \bool_set_false:N \l_@@_fontcfg_bool
+ }
+% \end{macrocode}
+%
% \begin{macro}{Path}
% For fonts that aren't installed in the system. If no argument is given, the font is located
% with |kpsewhich|; it's either in the current directory or the \TeX\ tree. Otherwise, the
@@ -420,18 +432,29 @@
% This script is executed for every extra shape, which seems wasteful,
% but allows alternate italic shapes from a separate font, say, to
% be loaded and to be auto-scaled correctly. Even if this would be ugly.
+%
+% To begin, change to \cs{rmfamily} but use internal commands in case cs{rmfamily}
+% has been overwritten.
+% (Note that changing \cs{rmfamily} with fontspec resets \cs{encodingdefault}
+% appropriately.)
% \begin{macrocode}
\cs_new:Nn \@@_calc_scale:n
{
\group_begin:
- \rmfamily
+
+ \fontencoding { \encodingdefault }
+ \fontfamily { \rmdefault }
+ \selectfont
+
\@@_set_font_dimen:NnN \l_@@_tmpa_dim {#1} \font
\@@_set_font_dimen:NnN \l_@@_tmpb_dim {#1} \l_fontspec_font
+
\tl_gset:Nx \l_@@_scale_tl
- {
- \fp_eval:n { \dim_to_fp:n {\l_@@_tmpa_dim} /
- \dim_to_fp:n {\l_@@_tmpb_dim} }
- }
+ {
+ \fp_eval:n { \dim_to_fp:n {\l_@@_tmpa_dim} /
+ \dim_to_fp:n {\l_@@_tmpb_dim} }
+ }
+
\@@_info:n {set-scale}
\group_end:
}