| 1 |
The FONTSPEC package |
| 2 |
==================== |
| 3 |
|
| 4 |
The `fontspec` package provides an automatic and unified interface for loading |
| 5 |
fonts in LaTeX. XeTeX and LuaTeX (the latter through the `luaotfload` package) |
| 6 |
allows a direct interface to fonts which may be loaded by their name or filename, |
| 7 |
so no manual font installation is required. |
| 8 |
|
| 9 |
This package also provides access to the large number of font features |
| 10 |
available with OpenType (and other) fonts, including upper and lower case numbers, |
| 11 |
proportional and monospaced numbers, swash letters, ligature control, and many |
| 12 |
many others. |
| 13 |
|
| 14 |
|
| 15 |
Documentation |
| 16 |
------------- |
| 17 |
|
| 18 |
See the PDF documentation for complete user information (including examples): |
| 19 |
|
| 20 |
texdoc fontspec |
| 21 |
|
| 22 |
Additional online documentation is provided at: |
| 23 |
<http://latex3.github.io/fontspec/> |
| 24 |
|
| 25 |
The package code is documented in typeset PDF form via |
| 26 |
|
| 27 |
texdoc fontspec-code |
| 28 |
|
| 29 |
Licence |
| 30 |
------- |
| 31 |
|
| 32 |
This package is distributed under the terms and conditions of the |
| 33 |
LaTeX Project Public License (LPPL), version 1.3c or higher. |
| 34 |
|
| 35 |
The maintainer of the package is Will Robertson and the LaTeX3 project. |
| 36 |
|
| 37 |
|
| 38 |
Summary of user commands |
| 39 |
------------------------ |
| 40 |
|
| 41 |
To define commands for selecting fonts efficiently through a document: |
| 42 |
|
| 43 |
\newfontfamily\<font switch>{<font name>}[<font options>] |
| 44 |
\newfontface \<font switch>{<font name>}[<font options>] |
| 45 |
|
| 46 |
To select the default document fonts: |
| 47 |
|
| 48 |
\setmainfont{<font name>}[<font options>] |
| 49 |
\setsansfont{<font name>}[<font options>] |
| 50 |
\setmonofont{<font name>}[<font options>] |
| 51 |
|
| 52 |
To define an ad hoc font family individually: |
| 53 |
|
| 54 |
\fontspec{<font name>}[<font options>] |
| 55 |
|
| 56 |
To specify features to be used for every subsequently defined font: |
| 57 |
|
| 58 |
\defaultfontfeatures{<default font options>} |
| 59 |
\defaultfontfeatures+{<add to default font options>} |
| 60 |
|
| 61 |
To specify features to be used for specific fonts: |
| 62 |
|
| 63 |
\defaultfontfeatures[<font name or switch>]{<default font options>} |
| 64 |
\defaultfontfeatures+[<font name or switch>]{<add to defaults>} |
| 65 |
|
| 66 |
To add features to the font family currently in use: |
| 67 |
|
| 68 |
\addfontfeatures{<font options to add>} |
| 69 |
|
| 70 |
|
| 71 |
Package details |
| 72 |
--------------- |
| 73 |
|
| 74 |
Release versions of fontspec are available from CTAN: |
| 75 |
<http://www.ctan.org/pkg/fontspec> |
| 76 |
|
| 77 |
Development and historical versions are available from Github: |
| 78 |
<http://github.com/latex3/fontspec> |
| 79 |
|
| 80 |
Please offer suggestions and file bug reports in the issue tracker: |
| 81 |
<http://github.com/latex3/fontspec/issues> |
| 82 |
|
| 83 |
If you are running TeX Live, you can update to the latest version of this |
| 84 |
package by running |
| 85 |
|
| 86 |
tlmgr install fontspec |
| 87 |
|
| 88 |
If you wish to manually download the latest release version from CTAN, |
| 89 |
get the pre-built TDS package and extract it into your local texmf tree: |
| 90 |
|
| 91 |
http://mirror.ctan.org/install/macros/unicodetex/latex/fontspec.tds.zip |
| 92 |
|
| 93 |
Historical releases are available via GitHub: |
| 94 |
<https://github.com/latex3/fontspec/releases> |
| 95 |
<https://github.com/latex3/fontspec/tags> |
| 96 |
|
| 97 |
If you wish to use the latest development version from Github, |
| 98 |
use git to obtain the latest repository code with |
| 99 |
|
| 100 |
git clone git://github.com/latex3/fontspec.git |
| 101 |
|
| 102 |
Having obtained the package from Github, install the package code by running |
| 103 |
|
| 104 |
l3build install |
| 105 |
|
| 106 |
This will compile the documentation and install all necessary files in your |
| 107 |
local texmf tree. Depending how your TeX distribution is configured |
| 108 |
you may then need to update the filename database with `texhash`. |