In Win7 system, Tex live uses the fontspec package to directly access the system font, win7fontspec

Source: Internet
Author: User

In Win7 system, Tex live uses the fontspec package to directly access the system font, win7fontspec

Currently, most of the methods provided by the network are based on Tex live on Linux systems. However, how to directly access the system fonts of Tex live installed on Windows systems is rarely described and cannot be explained clearly. This article provides a simple example of directly accessing the system font, from which we can see that XeLaTex is powerful in supporting Chinese characters. In order to make the explanation clearer, this article adds a corresponding one.

The environment where the methods described in this article are located is:

  • Operating System: Windows 7
  • LaTeX compiling 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

C: \ Windows \ Fonts on Windows 7 contains a large number of Fonts for you to choose from. Right-click each font file to display a shortcut menu, click properties to know the name of the font file, such as the following Font:

Then you can write down the TeX source code fontTest1.tex:

Directly access system font 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}

Run the following command:

xelatex fontTest1.tex

The resulting fonttest1.pdf file is:

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.