Currently, the network gives the method to most of the pins on the Linux system above Tex Live, and how to directly access the system font for Tex Live installed on the Windows system is rarely described, and the explanation is unclear. This article gives a simple example of direct access to the system font, from which we can see Xelatex's strong ability to support Chinese. In order to explain the more clearly, this article attached the corresponding.
The environment in which this method is located is:
- Operating system: Windows 7
- Latex compilation Environment: Xelatex 3.14159265-2.6-0.99992 (TeX Live 2015/w32tex)
Determine the path and name of the font you want to use in the system
In the Win7 system above the C:\Windows\Fonts contains a large number of fonts you choose, for each font file, by right-click on the shortcut menu, click on the properties to know the name of the font file, such as the following font:
So you can write the following Tex source code Fonttest1.tex:
Direct access to system fonts Tex source code
\documentclass{Article}\usepackage{Fontspec}%\usepackage{slantfont, BOLDFONT}{XECJK}\newcommand{\kai}{\fontspec[externallocation=c:/windows/fonts/]{Simkai.ttf}\selectfont}\newcommand{\song}{\fontspec[externallocation=c:/windows/fonts/]{Simsun.ttc}\selectfont}\newcommand{\li}{\fontspec[externallocation=c:/windows/fonts/]{Simli. TTF}\selectfont}\begin{Document}\kai{I love China} \par\song{I love China}\par\li{I love China}\end{Document}
Use the command:
xelatex fontTest1.tex
The resulting fonttest1.pdf file is:
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Win7 system above Tex live using FONTSPEC package to access system fonts directly