summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTong Hui <tonghuix@gmail.com>2016-10-10 02:56:10 +0800
committerTong Hui <tonghuix@gmail.com>2016-10-10 02:56:10 +0800
commitda15a9773aaae31e74f7e0f2c5a49709c9f21765 (patch)
treeb2a4848edded42e91c4b5a420a1ce479d0658ee9
parent6b3a8335fe9a7f668ce863ff1510fa268b463fd7 (diff)
downloadfsfs-zh-da15a9773aaae31e74f7e0f2c5a49709c9f21765.tar.xz
add FandolSong as default font
-rw-r--r--.travis.yml3
-rwxr-xr-xinstall.fandolsong.sh5
-rw-r--r--pdf/template.tex10
3 files changed, 11 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index f1429bd..3ba8fbb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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:
diff --git a/install.fandolsong.sh b/install.fandolsong.sh
new file mode 100755
index 0000000..b1dbc5b
--- /dev/null
+++ b/install.fandolsong.sh
@@ -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
diff --git a/pdf/template.tex b/pdf/template.tex
index cd77fa2..f119676 100644
--- a/pdf/template.tex
+++ b/pdf/template.tex
@@ -71,7 +71,7 @@ framexleftmargin=20pt
\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的·号无法显示
@@ -92,7 +92,6 @@ framexleftmargin=20pt
BoldItalicFont = *-Italic,
]
{Liberation Serif}
-% {Bitstream Charter} % uncomment for release build
% 设置中文字体
\setCJKmainfont
@@ -104,9 +103,10 @@ framexleftmargin=20pt
]
%{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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -149,7 +149,7 @@ framexleftmargin=20pt
\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}
@@ -218,7 +218,7 @@ framexleftmargin=20pt
\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}}