summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fontspec/fontspec-code-internal.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-02-22 03:01:30 +0000
committerNorbert Preining <norbert@preining.info>2020-02-22 03:01:30 +0000
commit3549e67b13c8460a73d122fbc2eef8badd816636 (patch)
tree9a4470b701a252b954f3e41771010f24350a033c /macros/latex/contrib/fontspec/fontspec-code-internal.dtx
parentedf9632b63615c375b45941052fe190d1e02d887 (diff)
CTAN sync 202002220301
Diffstat (limited to 'macros/latex/contrib/fontspec/fontspec-code-internal.dtx')
-rw-r--r--macros/latex/contrib/fontspec/fontspec-code-internal.dtx45
1 files changed, 45 insertions, 0 deletions
diff --git a/macros/latex/contrib/fontspec/fontspec-code-internal.dtx b/macros/latex/contrib/fontspec/fontspec-code-internal.dtx
index 6282569a6f..375fc7be2e 100644
--- a/macros/latex/contrib/fontspec/fontspec-code-internal.dtx
+++ b/macros/latex/contrib/fontspec/fontspec-code-internal.dtx
@@ -724,6 +724,7 @@
\@@_declare_shapes_normal:nn {#1} {#2}
\@@_declare_shapes_smcaps:nn {#1} {#2}
\@@_declare_shape_slanted:nn {#1} {#2}
+ \@@_declare_shapes_bx:nn {#1} {#2}
\@@_declare_shape_loginfo:nn {#1} {#2}
}
% \end{macrocode}
@@ -871,6 +872,50 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_declare_shapes_bx:nn}
+% Similar processing for setting up b/bx substitutions.
+% \begin{macrocode}
+\cs_new:Nn \@@_declare_shapes_bx:nn
+ {
+ \bool_if:nT
+ {
+ \str_if_eq_p:ee {#1} {\bfdefault} &&
+ !(\str_if_eq_p:ee {\bfdefault} {bx})
+ }
+ {
+ % bx/?
+ \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl} {\g_@@_nfss_family_tl}
+ {bx} {#2}
+ { <->ssub*\g_@@_nfss_family_tl/\bfdefault/#2 }
+ { \l_@@_postadjust_tl }
+
+ % bx/sc -> b/sc
+ \tl_if_empty:NF \l_@@_nfss_sc_tl
+ {
+ \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl} {\g_@@_nfss_family_tl}
+ {bx} { \@@_combo_sc_shape:n {#2} }
+ { <->ssub*\g_@@_nfss_family_tl/\bfdefault/#2 }
+ { \l_@@_postadjust_tl }
+ }
+
+ % bx/sl -> bx/it
+ \bool_if:nT
+ {
+ \str_if_eq_p:ee {#2} {\itdefault} &&
+ !(\str_if_eq_p:ee {\itdefault} {\sldefault})
+ }
+ {
+ \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl} {\g_@@_nfss_family_tl}
+ {bx} {\sldefault}
+ { <->ssub*\g_@@_nfss_family_tl/bx/\itdefault }
+ { \l_@@_postadjust_tl }
+ }
+
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_declare_shape_loginfo:nn}
% Lastly some informative messaging.
% \begin{macrocode}