Win7 system above Tex live using FONTSPEC package to access system fonts directly

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.