Skip to content

Commit

Permalink
添加中文字体
Browse files Browse the repository at this point in the history
  • Loading branch information
Astro-Lee committed Jun 20, 2023
1 parent fdbd242 commit 3ff3d41
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/Compiling LaTeX template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
cp YNUthesis.cls template/
cp YNUthesis.def template/
cp latexmkrc template/
cp -r fonts template/
- name: Upload Artifact
uses: actions/upload-artifact@v3
Expand Down
10 changes: 5 additions & 5 deletions YNUthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@
Please~ update~ an~ up-to-date~ version~ of~ it \\
using~ your~ TeX~ package~ manager~ or~ from~ CTAN.
}
\__YNU_check_class:nnn { ctexbook } { 2022/07/14 } { 2.5.10 }
\__YNU_check_class:nnn { ctexbook } { 2021/07/14 } { 2.5.10 }
\sys_if_engine_xetex:T
{ \__YNU_check_package:nnn { xeCJK } { 2022/08/05 } { 3.9.1 } }
{ \__YNU_check_package:nnn { xeCJK } { 2021/08/05 } { 3.9.1 } }
\geometry
{
paper = a4paper,
Expand Down Expand Up @@ -284,7 +284,7 @@
\cs_new_protected:Npn \YNU@xingkai
{ \__YNU_switch_family:n { YNU@xingkai } }
\tl_const:Nn \__YNU_cjk_font_options:
{ UprightFont = *, ItalicFont = *, AutoFakeBold = true }
{ Path=fonts/, UprightFont = *, ItalicFont = *, AutoFakeBold = true }
\cs_new_protected:Npx \__YNU_setCJKmainfont:n #1
{ \__YNU_setCJKmainfont:nn {#1} { \__YNU_cjk_font_options: } }
\cs_new_protected:Npx \__YNU_setCJKsansfont:n #1
Expand Down Expand Up @@ -614,8 +614,8 @@
{
\__YNU_setCJKmainfont:n { SimSun }
\__YNU_setCJKsansfont:n { SimHei }
\__YNU_setCJKmonofont:n { FangSong }
\__YNU_set_cjk_font_kai:n { KaiTi }
\__YNU_setCJKmonofont:n { SimFang }
\__YNU_set_cjk_font_kai:n { SimKai }
\__YNU_set_cjk_font_xingkai:n { STXingkai }
}
\cs_new_protected:Npn \__YNU_load_font:
Expand Down
10 changes: 5 additions & 5 deletions YNUthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,9 @@ Copyright (C) 2023 by Rui-Zhi Li <[email protected]>
% \end{macro}
%
% \begin{macrocode}
\@@_check_class:nnn { ctexbook } { 2022/07/14 } { 2.5.10 }
\@@_check_class:nnn { ctexbook } { 2021/07/14 } { 2.5.10 }
\sys_if_engine_xetex:T
{ \@@_check_package:nnn { xeCJK } { 2022/08/05 } { 3.9.1 } }
{ \@@_check_package:nnn { xeCJK } { 2021/08/05 } { 3.9.1 } }
% \end{macrocode}
%
% \subsection{页面布局}
Expand Down Expand Up @@ -770,7 +770,7 @@ Copyright (C) 2023 by Rui-Zhi Li <[email protected]>
% 将 bold、italic 和 bold italic 统一按照 roman 设置,只需提供字体名即可。
% \begin{macrocode}
\tl_const:Nn \@@_cjk_font_options:
{ UprightFont = *, ItalicFont = *, AutoFakeBold = true }
{ Path=fonts/, UprightFont = *, ItalicFont = *, AutoFakeBold = true }
\cs_new_protected:Npx \@@_setCJKmainfont:n #1
{ \@@_setCJKmainfont:nn {#1} { \@@_cjk_font_options: } }
\cs_new_protected:Npx \@@_setCJKsansfont:n #1
Expand Down Expand Up @@ -1227,8 +1227,8 @@ Copyright (C) 2023 by Rui-Zhi Li <[email protected]>
{
\@@_setCJKmainfont:n { SimSun }
\@@_setCJKsansfont:n { SimHei }
\@@_setCJKmonofont:n { FangSong }
\@@_set_cjk_font_kai:n { KaiTi }
\@@_setCJKmonofont:n { SimFang }
\@@_set_cjk_font_kai:n { SimKai }
\@@_set_cjk_font_xingkai:n { STXingkai }
}
% \end{macrocode}
Expand Down
Binary file added fonts/STXingkai.ttf
Binary file not shown.
Binary file added fonts/SimFang.ttf
Binary file not shown.
Binary file added fonts/SimHei.ttf
Binary file not shown.
Binary file added fonts/SimKai.ttf
Binary file not shown.
Binary file added fonts/SimSun.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions fonts/声明.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
同级目录中的字体仅作为个人用途使用;如果涉及商用,请自行确认相关许可。

0 comments on commit 3ff3d41

Please sign in to comment.