ソースコードの管理場所
Revision | dc8b1c16a51c0f53e28af21fed59db870d8265c7 (tree) |
---|---|
Time | 2019-10-01 16:25:02 |
Author | maqiyuan <1113706230@qq.c...> |
Commiter | maqiyuan |
removed obsolete Chinese doc.
@@ -1,280 +0,0 @@ | ||
1 | -\documentclass[DIV=13]{article} | |
2 | -\usepackage{typearea} | |
3 | -\usepackage{hologo} | |
4 | -\makeatletter | |
5 | -\def\verbatim{\@verbatim \frenchspacing\@vobeyspaces\luatexlocalleftbox{\hskip3\zw} \@xverbatim} | |
6 | -\makeatother | |
7 | -\def\pTeX{p\TeX} | |
8 | -\def\LuaTeX{Lua\TeX} | |
9 | -\def\XeTeX{\hologo{XeTeX}} | |
10 | -\def\ConTeXt{Con\TeX t} | |
11 | -\usepackage{booktabs} | |
12 | -\usepackage{multicol} | |
13 | -\usepackage{indentfirst} | |
14 | -\usepackage{luatexja-fontspec} | |
15 | -\parindent2\zw | |
16 | -\linespread{1.25} | |
17 | -\setmainjfont{FandolSong} | |
18 | -\title{\textbf{\LuaTeX-ja简体中文字体配置}} | |
19 | -\author{马起园\hskip2.5\zw 苏 杰} | |
20 | -\date{2013年5月} | |
21 | -\begin{document} | |
22 | -\maketitle | |
23 | -\section{\LuaTeX-ja项目简介} | |
24 | -\LuaTeX-ja项目旨在将\pTeX 处理汉字的机制及相关功能移植到\LuaTeX 下,当前项目 | |
25 | -的成员有:北川弘典、前田一贵、八登崇之、黑木裕介 、阿部纪行、山本宗宏、本田知 | |
26 | -亮、斋藤修三郎和马起园。 | |
27 | - | |
28 | -\LuaTeX 虽然在编码上支持Unicode,但并不能直接处理汉字断行以及禁则应用,而 | |
29 | -在\pTeX 系列中则能够处理断行并应用禁则,但并不支持PDF输出。\LuaTeX 下处理 | |
30 | -汉字的断行和应用禁则需要使用其内建的诸多callback来进行。\pTeX 扩展TFM为JFM, | |
31 | -但是JFM抽象程度更高,该文件涉及到的内容是字体的标点压缩,可以用于多个汉字字体。 | |
32 | - | |
33 | -当前版本的\LuaTeX-ja 可以应用于\TeX\ Live和W32\TeX,在旧版本MikTeX下使用会 | |
34 | -出问题,因为MikTeX下的\LuaTeX 存在编译上的bug。 | |
35 | - | |
36 | -\section{字体使用} | |
37 | - | |
38 | -\subsection{关于\LuaTeX-ja的字体调用} | |
39 | - | |
40 | -\XeTeX 在调用字体的时候需要使用freetype和fontconfig库,所以需要更新字体缓 | |
41 | -存,但是在\LuaTeX 下就不太一样。\LuaTeX 只需要在初次使用的时候刷新字体数据 | |
42 | -库即可(此数据库是一个lua文件)。\LuaTeX 下的字体缓存实际上是将字体的各种 | |
43 | -信息导出并保存的文件,在调用一个新字体的时候会生成一个。\LuaTeX 对于字体的 | |
44 | -处理并没有使用freetype,而是使用了fontforge,不过可能由于该库的接口有一些 | |
45 | -问题,导致部分字体无法在\LuaTeX 下使用。 | |
46 | - | |
47 | -在使用\LuaTeX-ja的时候,需要先刷新字体数据库,该命令的使用方法如下: | |
48 | -\begin{verbatim} | |
49 | -Usage: mkluatexfontdb [OPTION]... | |
50 | - | |
51 | -Rebuild the LuaTeX font database. | |
52 | - | |
53 | -Valid options: | |
54 | - -f --force force re-indexing all fonts | |
55 | - -q --quiet don't output anything | |
56 | - -v --verbose=LEVEL be more verbose (print the searched directories) | |
57 | - -vv print the loaded fonts | |
58 | - -vvv print all steps of directory searching | |
59 | - -V --version print version and exit | |
60 | - -h --help print this message | |
61 | -\end{verbatim} | |
62 | - | |
63 | -在新版本的\texttt{luaotfload}包中,提供了新的命令\texttt{luaotfload-tool}, | |
64 | -但如上所述的\texttt{mkluatexfontdb}依然能够使用。 | |
65 | - | |
66 | -又是可能遇到通不过的字体,需要将这个字体的绝对路径添加到\texttt{luaotfload-blacklist.cnf}中, | |
67 | -这个文件的内容如下: | |
68 | -\begin{verbatim} | |
69 | -% Takes ages to load | |
70 | -LastResort.ttf % a MacOSX font, but also available for free from unicode.org | |
71 | -% Segfaults under LuaTeX 0.76 | |
72 | -lingoes.ttf | |
73 | -% http://tug.org/pipermail/luatex/2013-May/004239.html | |
74 | -Diablindall.ttf | |
75 | -spltfgbd.ttf | |
76 | -spltfgbi.ttf | |
77 | -spltfgit.ttf | |
78 | -spltfgrg.ttf | |
79 | -\end{verbatim} | |
80 | - | |
81 | -如果你在\texttt{texmf-local}下添加了某些私有字体,请及时运行\texttt{texhash}, | |
82 | -这样能够方便在运行\LuaTeX 的时候能够通过kpathsea库找到他们。 | |
83 | - | |
84 | -Lua\TeX 调用TrueType和OpenType字体并没有固定的方式,\XeTeX 使用了固定的接口, | |
85 | -而Lua\TeX 需要使用luaotfload包来进行字体的调用。这两种字体一般都有高级特性, | |
86 | -在\TeX\ Live或者W32\TeX 中可以使用\texttt{otfinfo}命令来查看相关的信息: | |
87 | -\begin{verbatim} | |
88 | -'Otfinfo' reports information about an OpenType font to standard output. | |
89 | -Options specify what information to print. | |
90 | - | |
91 | -Usage: otfinfo [-sfzpg | OPTIONS] [OTFFILES...] | |
92 | - | |
93 | -Query options: | |
94 | - -s, --scripts Report font's supported scripts. | |
95 | - -f, --features Report font's GSUB/GPOS features. | |
96 | - -z, --optical-size Report font's optical size information. | |
97 | - -p, --postscript-name Report font's PostScript name. | |
98 | - -a, --family Report font's family name. | |
99 | - -v, --font-version Report font's version information. | |
100 | - -i, --info Report font's names and designer/vendor info. | |
101 | - -g, --glyphs Report font's glyph names. | |
102 | - -t, --tables Report font's OpenType tables. | |
103 | - -T, --dump-table NAME Output font's 'NAME' table. | |
104 | - | |
105 | -Other options: | |
106 | - --script=SCRIPT[.LANG] Set script used for --features [latn]. | |
107 | - -V, --verbose Print progress information to standard error. | |
108 | - -h, --help Print this message and exit. | |
109 | - -q, --quiet Do not generate any error messages. | |
110 | - --version Print version number and exit. | |
111 | - | |
112 | -Report bugs to <ekohler@gmail.com>. | |
113 | -\end{verbatim} | |
114 | - | |
115 | -\subsection{使用字体的方法} | |
116 | - | |
117 | -目前\LuaTeX-ja支持在plain \TeX 和\LaTeX 下使用。如果你使用texinfo,那么很 | |
118 | -不幸,你不太可能使用\LuaTeX-ja来处理中文,因为texinfo是针对pdf\TeX 设计的, | |
119 | -在\LuaTeX 下使用已经有了一定的不兼容现象,即使完全兼容也需要对texinfo中的 | |
120 | -字体配置进行调整,如果你急需使用texinfo来处理中文,请尝试W32\TeX 下的texinfo, | |
121 | -这个发行版中的texinfo已经打了补丁。对于\ConTeXt 用户,请使用李延瑞的zhfonts模块 | |
122 | -\footnote{见https://github.com/liyanrui/zhfonts}。 | |
123 | - | |
124 | -在plain \TeX 中使用Lua\TeX-ja可以在源文件中写入: | |
125 | -\begin{verbatim} | |
126 | -\input luatexja-core.sty | |
127 | -\end{verbatim} | |
128 | - | |
129 | -Lua\TeX-ja移植的了\verb!\jfont!命令,在plain \TeX 下需要通过该命令来 | |
130 | -控制输出的汉字字体,例如: | |
131 | -\begin{verbatim} | |
132 | -\jfont\song={name:SimSun:jfm=banjiao} at 10pt | |
133 | -\song 我能吞下玻璃而不伤身体。 | |
134 | -\end{verbatim} | |
135 | - | |
136 | -上文中的\verb!jfm=banjiao!使用来控制标点压缩的,如果此项未设定,则 | |
137 | -使用默认的\verb!ujis!压缩模式,对于简体中文来讲,可用的模式有: | |
138 | -\texttt{quanjiao,banjiao,kaiming, CCT}。 | |
139 | - | |
140 | -而在\LaTeX 下使用则较为简单,使用: | |
141 | -\begin{verbatim} | |
142 | -\usepackage{luatexja-fontspec} | |
143 | -\end{verbatim} | |
144 | -这个包对fontspec包进行了封装,令其能够较为便利地设定汉字字体。 | |
145 | -这个包提供的命令如下: | |
146 | -\begin{table}[htbp] | |
147 | - \centering | |
148 | - \begin{tabular}{ll} | |
149 | - \toprule | |
150 | - \multicolumn{1}{c}{\textbf{命令}} & \multicolumn{1}{c}{\textbf{用途}} \\ | |
151 | - \midrule | |
152 | - \verb!\jfontspec! & 改变当前汉字字体 \\ | |
153 | - \verb!\setmainjfont! & 设定文档主汉字字体 \\ | |
154 | - \verb!\setsansjfont! & 设定文档的无衬线汉字字体(黑体) \\ | |
155 | - \verb!\newjfontfamily! & 设定新的汉字字体族命令 \\ | |
156 | - \verb!\newjfontface! & 设定新的汉字字体命令 \\ | |
157 | - \verb!\defaultjfontfeatures! & 默认汉字字体的特性 \\ | |
158 | - \verb!\addjfontfeatures! & 设定当前字体的特性 \\ | |
159 | - \bottomrule | |
160 | - \end{tabular}% | |
161 | -\end{table}% | |
162 | - | |
163 | -\subsection{不可用字体系列} | |
164 | - | |
165 | -中文字体在丰度上与日文字体对比并不占优势,所以中文\TeX 文档在使用使用字体 | |
166 | -上没有太大变化。当你想在\LuaTeX-ja下是有部分特色字体的时候,请做好此种字体 | |
167 | -可能无法使用的准备。目前报错明显的字体有数个: | |
168 | -\begin{itemize} | |
169 | -\item 灵格斯词典附带的音标字体,这些字体会安装到系统字体文件夹下,在更新 | |
170 | - 字体数据库的时候会出现程序崩溃的情况,这是字体本身的原因,需要添加到黑名单中 | |
171 | -\item 康熙字典体,这是中国大陆一位业余字体设计者所设计的字体,由于该作者 | |
172 | - 缺乏相关技术知识,导致此字体的CMap出错,无论是完全版还是试用版都会出现 | |
173 | - 问题,此外该字体的boundingbox也是错误的,在嵌入pdf文档中十分影响阅读 | |
174 | -\item 信黑体,这个字体也是CMap的问题,无法使用 | |
175 | -\end{itemize} | |
176 | -\subsection{Fandol字体系列} | |
177 | -Fandol系列字体由本文档两位作者联合开发,含有数种样式。 | |
178 | -该套字体可以在TeXLive下进行更新。 | |
179 | - | |
180 | -\begin{table}[htbp] | |
181 | - \centering | |
182 | - \begin{tabular}{lll} | |
183 | - \toprule | |
184 | - \multicolumn{1}{c}{\textbf{字体名}} & \multicolumn{1}{c}{\textbf{文件名}} & \multicolumn{1}{c}{\textbf{样例}} \\ | |
185 | - \midrule | |
186 | - FandolSong-Regular & \texttt{FandolSong-Regular.otf} & {我能吞下玻璃而不伤身体} \\ | |
187 | - FandolSong-Bold & \texttt{FandolSong-Bold.otf} & {\bf 我能吞下玻璃而不伤身体} \\ | |
188 | - FandolHei-Regular & \texttt{FandolHei-Regular.otf} & {\jfontspec{FandolHei-Regular}我能吞下玻璃而不伤身体} \\ | |
189 | - FandolHei-Bold & \texttt{FandolHei-Bold.otf} & {\jfontspec{FandolHei-Bold}我能吞下玻璃而不伤身体} \\ | |
190 | - FandolFang-Regular & \texttt{FandolFang-Regular.otf} & {\jfontspec{FandolFang-Regular}我能吞下玻璃而不伤身体}\\ | |
191 | - FandolKai-Regular & \texttt{FandolKai-Regular} & {\jfontspec{FandolKai-Regular}我能吞下玻璃而不伤身体}\\ | |
192 | - \bottomrule | |
193 | - \end{tabular}% | |
194 | -\end{table}% | |
195 | - | |
196 | - | |
197 | -\subsection{华文字体系列} | |
198 | -在微软提供的Office套装中附带了一定数量的中文字体, | |
199 | -这些字体是常州华文印刷新技术有限公司制造的。 | |
200 | -这些字体安装在系统字体文件夹下,在使用\LuaTeX-ja 的时候 | |
201 | -可以酌情使用。在本文档中,我们推荐简体中文用户使用 | |
202 | -此套字体,从使用率上看,各大学都会装有微软的操作系统 | |
203 | -和微软的Office,可以说已经相当普及,故做推荐。 | |
204 | - | |
205 | -\begin{table}[htbp] | |
206 | - \centering | |
207 | - \begin{tabular}{llll} | |
208 | - \toprule | |
209 | - \multicolumn{1}{c}{\textbf{字体名}} & \multicolumn{1}{c}{\textbf{文件名}} & \multicolumn{1}{c}{\textbf{PostScript名}} & \multicolumn{1}{c}{\textbf{样例}} \\ | |
210 | - \midrule | |
211 | - 华文宋体 & \texttt{STSONG.TTF} & STSong & {\jfontspec{STSong}我能吞下玻璃而不伤身体} \\ | |
212 | - 华文中宋 & \texttt{STZHONGS.TTF} & STZhongsong & {\jfontspec{STZhongsong}我能吞下玻璃而不伤身体} \\ | |
213 | - 华文细黑 & \texttt{STXIHEI.TTF} & STXihei & {\jfontspec{STXihei}我能吞下玻璃而不伤身体} \\ | |
214 | - 华文楷体 & \texttt{STKAITI.TTF} & STKaiti & {\jfontspec{STKaiti}我能吞下玻璃而不伤身体} \\ | |
215 | - 华文仿宋 & \texttt{STFANGSO.TTF} & STFangsong & {\jfontspec{STFangsong}我能吞下玻璃而不伤身体} \\ | |
216 | - \bottomrule | |
217 | - \end{tabular}% | |
218 | -\end{table} | |
219 | - | |
220 | -\subsection{中易字体系列} | |
221 | -在Windows系统简体中文版中,附带了数种中文字体。 | |
222 | -这些字体为中易中标电子信息技术有限公司制造的。 | |
223 | -同我们强烈推荐的第一种方案比较,没有中宋。 | |
224 | -如果按照CCT的传统,一般使用黑体替换。 | |
225 | - | |
226 | -\begin{table}[htbp] | |
227 | - \centering | |
228 | - \begin{tabular}{llll} | |
229 | - \toprule | |
230 | - \multicolumn{1}{c}{\textbf{字体名}} & \multicolumn{1}{c}{\textbf{文件名}} & \multicolumn{1}{c}{\textbf{PostScript名}} & \multicolumn{1}{c}{\textbf{样例}} \\ | |
231 | - \midrule | |
232 | - 宋体 & \texttt{simsun.ttc} & SimSun & {\jfontspec{SimSun}我能吞下玻璃而不伤身体} \\ | |
233 | - 黑体 & \texttt{simhei.ttf} & SimHei & {\jfontspec{SimHei}我能吞下玻璃而不伤身体} \\ | |
234 | - 楷体 & \texttt{simkai.ttf} & KaiTi & {\jfontspec{KaiTi}我能吞下玻璃而不伤身体} \\ | |
235 | - 仿宋 & \texttt{simkai.ttf} & FangSong & {\jfontspec{FangSong}我能吞下玻璃而不伤身体} \\ | |
236 | - \bottomrule | |
237 | - \end{tabular}% | |
238 | -\end{table}% | |
239 | - | |
240 | -\subsection{Adobe字体系列} | |
241 | -在Adobe Reader简体中文版中,附带了宋体和黑体两种字体。 | |
242 | -这两种字体实际上是华文字体,但是和华文字体不能混用, | |
243 | -因为Adobe Reader中的中文字体的基线都进行了调整, | |
244 | -不能互相匹配。在Adobe InDesign中还附带了楷体和仿宋体。 | |
245 | -Adobe的中文字体的Postscript名即为文件名去掉后缀名。 | |
246 | - | |
247 | -\begin{table}[htbp] | |
248 | - \centering | |
249 | - \begin{tabular}{lll} | |
250 | - \toprule | |
251 | - \multicolumn{1}{c}{\textbf{字体名}} & \multicolumn{1}{c}{\textbf{文件名}} & \multicolumn{1}{c}{\textbf{样例}} \\ | |
252 | - \midrule | |
253 | - Adobe 宋体 Std & \texttt{AdobeSongStd-Light.otf} & {\jfontspec{AdobeSongStd-Light}我能吞下玻璃而不伤身体} \\ | |
254 | - Adobe 黑体 Std & \texttt{AdobeHeitiStd-Regular.otf} & {\jfontspec{AdobeHeitiStd-Regular}我能吞下玻璃而不伤身体} \\ | |
255 | - Adobe 楷体 Std & \texttt{AdobeKaitiStd-Regular.otf} & {\jfontspec{AdobeKaitiStd-Regular}我能吞下玻璃而不伤身体} \\ | |
256 | - Adobe 仿宋 Std & \texttt{AdobeFangsongStd-Regular.otf} & {\jfontspec{AdobeFangsongStd-Regular}我能吞下玻璃而不伤身体} \\ | |
257 | - \bottomrule | |
258 | - \end{tabular}% | |
259 | -\end{table}% | |
260 | - | |
261 | -\subsection{方正字体系列} | |
262 | -方正字体的来源有两种,第一种是使用方正的排版系统的时候会 | |
263 | -安装到Windows系统的字体文件夹下,第二种是针对Linux系统 | |
264 | -来说的,WPS for Linux附带了部分方正字体。 | |
265 | - | |
266 | -\begin{table}[htbp] | |
267 | - \centering | |
268 | - \begin{tabular}{llll} | |
269 | - \toprule | |
270 | - \multicolumn{1}{c}{\textbf{字体名}} & \multicolumn{1}{c}{\textbf{文件名}} & \multicolumn{1}{c}{\textbf{全名}} & \multicolumn{1}{c}{\textbf{样例}} \\ | |
271 | - \midrule | |
272 | - 方正书宋\_GBK & \texttt{FZSSK.TTF} & FZShuSong-Z01 & {\jfontspec{FZShuSong-Z01}我能吞下玻璃而不伤身体} \\ | |
273 | - 方正小标宋\_GBK & \texttt{FZXBSK.TTF} & FZXiaoBiaoSong-B05 & {\jfontspec{FZXiaoBiaoSong-B05}我能吞下玻璃而不伤身体} \\ | |
274 | - 方正黑体\_GBK & \texttt{FZHTK.TTF} & FZHei-B01 & {\jfontspec{FZHei-B01}我能吞下玻璃而不伤身体} \\ | |
275 | - 方正楷体\_GBK & \texttt{FZKTK.TTF} & FZKai-Z03 & {\jfontspec{FZKai-Z03}我能吞下玻璃而不伤身体} \\ | |
276 | - 方正仿宋\_GBK & \texttt{FZFSK.TTF} & FZFangSong-Z02 & {\jfontspec{FZFangSong-Z02}我能吞下玻璃而不伤身体} \\ | |
277 | - \bottomrule | |
278 | - \end{tabular}% | |
279 | -\end{table}% | |
280 | -\end{document} |