-
Notifications
You must be signed in to change notification settings - Fork 601
/
fonts.tex
22 lines (18 loc) · 868 Bytes
/
fonts.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
\newcommand{\FangSongFontName}{FangSong}
% ctex package stores one of "windows", "mac", and "fandol" in \g__ctex_fontset_tl
\ifthenelse{\equal{\csname g__ctex_fontset_tl\endcsname}{mac}}
{ % macOS
% FangSong
% Use system default fangsong font, no need for additional installation
\renewcommand{\FangSongFontName}{STFangsong}
% SongTi
% Fix songti font invocation in `ctex` package on MacOS old version, to enable bold font
% Detailes in: https://github.com/TheNetAdmin/zjuthesis/issues/48
% Similar implementation: https://github.com/xueruini/thuthesis/blob/a86b0824da527268645571cc5fe3096d65a665b3/thuthesis.dtx#L1447-L1461
\setCJKfamilyfont{zhsong}{Songti SC}
\renewcommand*{\songti}{\CJKfamily{zhsong}}
}
{}
\setCJKmainfont{\FangSongFontName}
\setmainfont{Times New Roman}
\renewcommand{\bibfont}{\zihao{5}\songti}