Skip to content

Commit

Permalink
update doc fonts
Browse files Browse the repository at this point in the history
- Iosevka Slab -> Latin Modern Mono (Light)
- Load Source Han by font file names
  • Loading branch information
stone-zeng committed Feb 18, 2023
1 parent cfe75f0 commit 564e0d8
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 31 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ thesis/
# Other
.DS_Store
*.zip
*.otf
source/*.md
source/*.sh
source/fduthesis-code.*
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- 封面信息栏改用表格实现 - [#60][#86]
- 通过引入 `ctex-c5size.clo` 来修改字号 - [#78]
- (fdudoc) 移除多余的文档层定义
- (fdudoc) 更新宏包手册字体

## [v0.8 (2022-09-04)]

Expand Down
70 changes: 39 additions & 31 deletions source/fduthesis-doc.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,8 @@
\bibliographystyle{gbt7714-numerical}
% \end{macrocode}
%
% \changes{v0.7c}{2019/02/08}{修改宏包手册主要字体。}
% \changes{v0.7c}{2019/02/08}{[\pkg{fdudoc}] 修改宏包手册主要字体。}
% \changes{v0.9}{2023/02/18}{[\pkg{fdudoc}] 更新宏包手册字体。}
%
% 西文字体。为兼容 macOS,系统字体需使用字体名,而 \TeXLive{}
% 中的字体需使用文件名。
Expand All @@ -1678,29 +1679,36 @@
BoldFont = *-Bold,
ItalicFont = *-Italic,
BoldItalicFont = *-BoldItalic]
\setmonofont{Iosevka Slab}[
UprightFont = * Light,
BoldFont = * Semibold,
ItalicFont = * Light Oblique,
BoldItalicFont = * Semibold Oblique,
Scale = MatchLowercase]
\setmonofont{lmmonolt10}[
Extension = .otf,
UprightFont = *-regular,
BoldFont = *-bold,
ItalicFont = *-oblique,
BoldItalicFont = *-boldoblique]
\setmathfont{LibertinusMath-Regular.otf}
% \end{macrocode}
%
% 中文字体。
% \begin{macrocode}
\setCJKmainfont{Source Han Serif SC}[
ItalicFont = FZKai-Z03,
CharacterWidth = Full]
\setCJKsansfont{Source Han Sans SC}[
ItalicFont = *,
CharacterWidth = Full]
\setCJKmonofont{Source Han Sans SC}[
UprightFont = * Normal,
BoldFont = * Bold,
AutoFakeSlant = 0.1763, % = tan(10 deg)
Scale = 0.8903,
CharacterWidth = Full]
\setCJKmainfont{SourceHanSerifSC}[
Extension = .otf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = FandolKai-Regular,
UprightFeatures = { CharacterWidth = Full },
BoldFeatures = { CharacterWidth = Full }]
\setCJKsansfont{SourceHanSansSC}[
Extension = .otf,
UprightFont = *-Regular,
BoldFont = *-Bold,
CharacterWidth = Full]
\setCJKmonofont{SourceHanSansSC}[
Extension = .otf,
UprightFont = *-Normal,
BoldFont = *-Bold,
AutoFakeSlant = 0.1763, % = tan(10 deg)
Scale = 0.9,
CharacterWidth = Full]
% \end{macrocode}
%
% 版式排版格式。
Expand Down Expand Up @@ -1971,7 +1979,7 @@
% \begin{macro}[int]{style@base}
% \begin{macrocode}
\lstdefinestyle{style@base}{
basewidth = 0.5 em,
basewidth = 0.525 em,
gobble = 3,
lineskip = 2 pt,
frame = l,
Expand Down Expand Up @@ -2016,17 +2024,17 @@
% \begin{macro}[int]{style@syntax}
% \begin{macrocode}
\lstdefinestyle{style@syntax}{
basewidth = 0.5 em,
gobble = 6,
escapeinside = {(*}{*)},
language = [LaTeX]TeX,
alsoletter = {*, -},
basicstyle = \footnotesize\ttfamily\color{MaterialGrey900},
keywordstyle = \bfseries\color{MaterialIndigo},
commentstyle = \itshape\color{MaterialGrey600},
texcsstyle = *\color{MaterialDeepOrange},
emphstyle = [1]\color{MaterialGreen800},
emphstyle = [2]\color{MaterialTeal}
basewidth = 0.525 em,
gobble = 6,
escapeinside = {(*}{*)},
language = [LaTeX]TeX,
alsoletter = {*, -},
basicstyle = \footnotesize\ttfamily\color{MaterialGrey900},
keywordstyle = \bfseries\color{MaterialIndigo},
commentstyle = \itshape\color{MaterialGrey600},
texcsstyle = *\color{MaterialDeepOrange},
emphstyle = [1]\color{MaterialGreen800},
emphstyle = [2]\color{MaterialTeal}
}
% \end{macrocode}
% \end{macro}
Expand Down

0 comments on commit 564e0d8

Please sign in to comment.