Skip to content

Commit

Permalink
\@@_declare_shapes_slanted:nn setup a scsl -> scit substitution
Browse files Browse the repository at this point in the history
If a slanted font is not provided, fontspec setup automatic sl -> it
substitutions in \@@_declare_shape_slanted:nn. But if a small caps
font was provided, an scit shape is defined but there is no
corresponding scsl -> scit substitution.

Fix this by adapting the code of \@@_declare_shapes_smcaps:nn into
\@@_declare_shape_slanted:nn.

Use a similar fix in \@@_declare_shapes_bx:nn for the bx/scsl -> bx/scit
substitution.
  • Loading branch information
Damien Robert committed Jun 18, 2020
1 parent df0bc1b commit cdbbebd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions fontspec-code-internal.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,20 @@
!(\str_if_eq_p:ee {\itdefault} {\sldefault})
}
{
% sl -> it
\@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl}{\g_@@_nfss_family_tl}{#1}{\sldefault}
{<->ssub*\g_@@_nfss_family_tl/#1/\itdefault}{\l_@@_postadjust_tl}
% scsl -> scit
\bool_if:nT
{
!\str_if_empty_p:N \l_@@_nfss_sc_tl &&
!(\str_if_eq_p:ee {\scitdefault} {\scsldefault})
}
{
\@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl}{\g_@@_nfss_family_tl}{#1}{\scsldefault}
{<->ssub*\g_@@_nfss_family_tl/#1/\scitdefault}{\l_@@_postadjust_tl}
}

}
}
% \end{macrocode}
Expand Down Expand Up @@ -909,6 +921,16 @@
{bx} {\sldefault}
{ <->ssub*\g_@@_nfss_family_tl/bx/\itdefault }
{ \l_@@_postadjust_tl }
% bx/scsl -> bx/scit
\bool_if:nT
{
!\str_if_empty_p:N \l_@@_nfss_sc_tl &&
!(\str_if_eq_p:ee {\scitdefault} {\scsldefault})
}
{
\_@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl}{\g_@@_nfss_family_tl}{bx}{\scsldefault}
{<->ssub*\g_@@_nfss_family_tl/bx/\scitdefault}{\l_@@_postadjust_tl}
}
}

}
Expand Down

0 comments on commit cdbbebd

Please sign in to comment.