Skip to content

Commit

Permalink
add FandolSong as default font
Browse files Browse the repository at this point in the history
  • Loading branch information
tonghuix committed Oct 9, 2016
1 parent 6b3a833 commit da15a97
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ before_script:
- lsb_release -a
- sudo apt-get update
- "./install.latex.ubuntu.sh"
- "./install.fandolsong.sh"
- wget https://github.com/jgm/pandoc/releases/download/1.17.2/pandoc-1.17.2-1-amd64.deb
- wget -c http://mirrors.ctan.org/fonts/fandol/FandolSong-Bold.otf http://mirrors.ctan.org/fonts/fandol/FandolKai-Regular.otf http://mirrors.ctan.org/fonts/fandol/FandolSong-Regular.otf
- mv *.ttf /usr/share/fonts/
- sudo dpkg -i *.deb

script:
Expand Down
5 changes: 5 additions & 0 deletions install.fandolsong.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

wget -c http://mirrors.ctan.org/fonts/fandol/FandolSong-Bold.otf http://mirrors.ctan.org/fonts/fandol/FandolKai-Regular.otf http://mirrors.ctan.org/fonts/fandol/FandolSong-Regular.otf
mv *.otf /usr/share/fonts/opentype/
sudo fc-cache
10 changes: 5 additions & 5 deletions pdf/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

\definecolor{shadecolor}{gray}{0.90}

% 修改字体,粗体为文泉驿微米黑,普通文字为方正宋体(非开源,包含在WPS包内)
% 修改字体,粗体为 Noto Sans CJK,普通文字 FandolSong 宋体(GPLv3)
% 字体选择: AR PL UMing 文鼎PL细上海宋 - 会出现问号在中间的错误
% AR PL SungtiL GB 文鼎PL简报宋 - 英文字体不好看
% Adobe Song Std L Adobe宋体 - item的·号无法显示
Expand All @@ -92,7 +92,6 @@
BoldItalicFont = *-Italic,
]
{Liberation Serif}
% {Bitstream Charter} % uncomment for release build

% 设置中文字体
\setCJKmainfont
Expand All @@ -104,9 +103,10 @@
]
%{AR PL SungtiL GB}
{FandolSong}

\setCJKsansfont{Noto Sans CJK SC}
%\setCJKsansfont{WenQuanYi Micro Hei}
\setCJKmonofont{WenQuanYi Micro Hei}
\setCJKmonofont{WenQuanYi Micro Hei Mono}
%\setCJKmonofont{Noto Sans Mono CJK SC} % uncomment for release build

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down Expand Up @@ -149,7 +149,7 @@
\author{\textbf{[美] Richard M. Stallman 著}\\
\textbf{北京 GNU/Linux 用户组 译}\thanks{本书基于 GNU 自由文档协议 1.3 版 (GNU Free Documentation License 1.3) 授权发布,可自由复制和分发,和/或基于 GNU 自由文档协议 1.3 版或自由软件基金会发布的更高版本,做出修改。本书使用 Markdown 书写,源码地址:\url{https://github.com/beijinglug/fsfs-zh/}。}}

\def\w3cdtfymd{\the\year-\ifnum\month<10 0\fi\the\month}
\def\w3cdtfymd{\the\year\ifnum\month<10 0\fi\the\month}
\date{\w3cdtfymd}

\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
Expand Down Expand Up @@ -218,7 +218,7 @@
\newcommand{\prechap}{第}
\newcommand{\postchap}{部分}
\newcommand{\presect}{}
\newcommand{\postsect}{}
\newcommand{\postsect}{}
\renewcommand{\chaptermark}[1]{\markboth{\textbf{\prechap \thechapter \postchap}\hspace*{1ex}#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\textbf{\presect \thesection \postsect}\hspace*{1ex}#1}}
\newcommand{\chap}[1]{\newpage\thispagestyle{empty}\chapter{#1}\label{chap:\thechapter}}
Expand Down

0 comments on commit da15a97

Please sign in to comment.