diff options
author | Karl Berry <karl@freefriends.org> | 2020-02-21 22:54:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-02-21 22:54:05 +0000 |
commit | ee6d6cebcf0c8b850920001a6420f42c156050b0 (patch) | |
tree | e6f3c72dd9ebe84c57967acf084fc280fa1cdcfc /Master/texmf-dist/source/latex/fontspec | |
parent | 22ea71d84d3cd13a2523c2ad951f22eff56ea91f (diff) |
fontspec (21feb20)
git-svn-id: svn://tug.org/texlive/trunk@53860 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec')
3 files changed, 57 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx index 6282569a6f0..375fc7be2e9 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx +++ b/Master/texmf-dist/source/latex/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} diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx index d235d0dbe91..a4a754d598c 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx @@ -64,6 +64,9 @@ % \begin{macrocode} \cs_new:Nn \@@_main_setmainfont:nn { + \ifdefined\DeclareFontSeriesDefault + \DeclareFontSeriesDefault[rm]{bf}{\bfdefault} + \fi \fontspec_set_family:Nnn \l_@@_rmfamily_family_tl {#1} {#2} \tl_set_eq:NN \rmdefault \l_@@_rmfamily_family_tl \tl_set_eq:NN \l_@@_rmfamily_encoding_tl \g_@@_nfss_enc_tl @@ -80,6 +83,9 @@ % \begin{macrocode} \cs_new:Nn \@@_main_setsansfont:nn { + \ifdefined\DeclareFontSeriesDefault + \DeclareFontSeriesDefault[sf]{bf}{\bfdefault} + \fi \fontspec_set_family:Nnn \l_@@_sffamily_family_tl {#1} {#2} \tl_set_eq:NN \sfdefault \l_@@_sffamily_family_tl \tl_set_eq:NN \l_@@_sffamily_encoding_tl \g_@@_nfss_enc_tl @@ -96,6 +102,9 @@ % \begin{macrocode} \cs_new:Nn \@@_main_setmonofont:nn { + \ifdefined\DeclareFontSeriesDefault + \DeclareFontSeriesDefault[tt]{bf}{\bfdefault} + \fi \fontspec_set_family:Nnn \l_@@_ttfamily_family_tl {#1} {#2} \tl_set_eq:NN \ttdefault \l_@@_ttfamily_family_tl \tl_set_eq:NN \l_@@_ttfamily_encoding_tl \g_@@_nfss_enc_tl diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx index e5a6f2f111b..5d07989465f 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx @@ -70,7 +70,7 @@ \ProvidesExplFile{fontspec.dtx} %</dtx> %<*fontspec> - {2020/02/03}{2.7h}{Font selection for XeLaTeX and LuaLaTeX} + {2020/02/21}{2.7i}{Font selection for XeLaTeX and LuaLaTeX} %</fontspec> % \end{macrocode} % @@ -89,8 +89,8 @@ %<lua>local fontspec = fontspec %<lua>fontspec.module = { %<lua> name = "fontspec", -%<lua> version = "2.7h", -%<lua> date = "2020/02/03", +%<lua> version = "2.7i", +%<lua> date = "2020/02/21", %<lua> description = "Font selection for XeLaTeX and LuaLaTeX", %<lua> author = "Khaled Hosny, Philipp Gesang, Will Robertson", %<lua> copyright = "Khaled Hosny, Philipp Gesang, Will Robertson", |