Skip to content

Commit

Permalink
xeCJK: 避免导言区字体警告
Browse files Browse the repository at this point in the history
fixed #439
  • Loading branch information
qinglee committed Feb 17, 2020
1 parent 6ec22fe commit 2853f72
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions xeCJK/xeCJK.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ Copyright and Licence
% \changes{v3.8.0}{2020/02/09}{兼容 \LaTeXe\ 2020/02/02 对 \pkg{NFSS} 的修改。}
% \changes{v3.8.0}{2020/02/09}{清理过时的兼容性补丁代码。}
%
% \CheckSum{10755}
% \CheckSum{10763}
% \GetFileId{xeCJK.sty}
%
% \title{\bfseries\pkg{xeCJK} 宏包}
Expand Down Expand Up @@ -6981,20 +6981,20 @@ Copyright and Licence
{
\@@_pass_args:nnnn
{ \xeCJK_set_family:nnn { \CJKrmdefault } } {#1} {#2}
{ \normalfont }
{ \@@_preamble_family:n { \CJKrmdefault } }
}
\cs_new_eq:NN \setCJKromanfont \setCJKmainfont
\NewDocumentCommand \setCJKsansfont { o m }
{
\@@_pass_args:nnnn
{ \xeCJK_set_family:nnn { \CJKsfdefault } } {#1} {#2}
{ \normalfont }
{ \@@_preamble_family:n { \CJKsfdefault } }
}
\NewDocumentCommand \setCJKmonofont { o m }
{
\@@_pass_args:nnnn
{ \xeCJK_set_family:nnn { \CJKttdefault } } {#1} {#2}
{ \normalfont }
{ \@@_preamble_family:n { \CJKttdefault } }
}
% \end{macrocode}
% \end{macro}
Expand All @@ -7007,6 +7007,16 @@ Copyright and Licence
\@onlypreamble \setCJKromanfont
% \end{macrocode}
%
% \changes{v3.8.2}{2020/02/17}{避免导言区字体警告。}
%
% \begin{macro}{\@@_preamble_family:n}
% 用在 \tn{setCJKmainfont} 等主要命令之后,确保导言区有 CJK 字体可用。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_preamble_family:n #1
{ \str_if_eq:eeT {#1} { \CJKfamilydefault } { \normalfont } }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\setCJKfamilyfont, \newCJKfontfamily, \CJKfontspec}
% \changes{v3.4.3}{2016/11/18}{允许字体属性可选项在后的新语法。}
% 分别用于预声明 CJK 字体族和声明并马上调用 CJK 字体族。
Expand Down

0 comments on commit 2853f72

Please sign in to comment.