Font selection in LaTeX for XeTeX and LuaTeX
Clone or download
Latest commit 053a303 Aug 2, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github github templates Jul 29, 2018
githooks new ins file and documented code into own file Nov 4, 2017
testfiles-disabled oh yeah, never got around to fix these Oct 18, 2017
testfiles sigh Jul 31, 2018
.gitignore new ins file and documented code into own file Nov 4, 2017
.travis.yml update travis for new l3build Jul 29, 2018
CHANGES.md bump changes Jul 31, 2018
COPYRIGHT commit hook! Jul 29, 2018
LICENSE add LICENSE file Oct 10, 2017
README.md tidy Nov 9, 2017
_config.yml Set theme jekyll-theme-minimal Jan 30, 2017
build.lua forgot to bump lua version -- now automated Jul 29, 2018
fontspec-api.dtx some more var declarations Jul 31, 2018
fontspec-closing.dtx commit hook! Jul 29, 2018
fontspec-code-load.dtx commit hook! Jul 29, 2018
fontspec-code.ltx commit hook! Jul 29, 2018
fontspec-doc-api.tex NFSS sets things globally, so \fontspec_set_family:Nnn etc should too Jul 29, 2018
fontspec-doc-enc.tex commit hook! Jul 29, 2018
fontspec-doc-featset.tex improve optical size description Jul 29, 2018
fontspec-doc-fontsel.tex allow nested .fontspec files to specify a font name Jul 31, 2018
fontspec-doc-intro.tex commit hook! Jul 29, 2018
fontspec-doc-luatex.tex commit hook! Jul 29, 2018
fontspec-doc-opentype.tex fix docu compilation Jul 29, 2018
fontspec-doc-style.sty fixup doc & allow doc parts to be compiled separately Nov 5, 2017
fontspec-doc-xetex.tex commit hook! Jul 29, 2018
fontspec-enc.dtx commit hook! Jul 29, 2018
fontspec-example.tex commit hook doing its thing Nov 4, 2017
fontspec-feat-aat.dtx commit hook! Jul 29, 2018
fontspec-feat-opentype.dtx commit hook! Jul 29, 2018
fontspec-fontload.dtx commit hook! Jul 29, 2018
fontspec-graphite.dtx some more var declarations Jul 31, 2018
fontspec-interfaces.dtx fix docu compilation Jul 29, 2018
fontspec-internal.dtx hmm, I swear I had this Font= syntax working... Jul 31, 2018
fontspec-keyval.dtx allow nested .fontspec files to specify a font name Jul 31, 2018
fontspec-lang.dtx commit hook! Jul 29, 2018
fontspec-lua.dtx todo note Jul 29, 2018
fontspec-math.dtx check-declarations fixes Jul 29, 2018
fontspec-msg.dtx more local/global Jul 29, 2018
fontspec-opening.dtx commit hook! Jul 29, 2018
fontspec-opentype.dtx commit hook! Jul 29, 2018
fontspec-patches.dtx commit hook! Jul 29, 2018
fontspec-scripts.dtx commit hook! Jul 29, 2018
fontspec-user.dtx missed some g -> l Jul 29, 2018
fontspec-vars.dtx some more var declarations Jul 31, 2018
fontspec-xfss.dtx commit hook! Jul 29, 2018
fontspec.cfg missing _tl Jul 29, 2018
fontspec.dtx forgot to bump lua version -- now automated Jul 29, 2018
fontspec.ins commit hook! Jul 29, 2018
fontspec.ltx commit hook! Jul 29, 2018
tagrelease.lua add tagrelease.lua script Aug 2, 2018
texlive.profile Working on Travis-CI Feb 5, 2017
texlive.sh travis: babel-english Jul 29, 2018

README.md

The FONTSPEC package

The fontspec package provides an automatic and unified interface for loading fonts in LaTeX. XeTeX and LuaTeX (the latter through the luaotfload package) allows a direct interface to fonts which may be loaded by their name or filename, so no manual font installation is required.

This package also provides access to the large number of font features available with OpenType (and other) fonts, including upper and lower case numbers, proportional and monospaced numbers, swash letters, ligature control, and many many others.

See the documentation fontspec.pdf for full information.

Summary of user commands

To define commands for selecting fonts efficiently through a document:

\newfontfamily\<font switch>{<font name>}[<font options>]
\newfontface  \<font switch>{<font name>}[<font options>]

To select the default document fonts:

\setmainfont{<font name>}[<font options>]
\setsansfont{<font name>}[<font options>]
\setmonofont{<font name>}[<font options>]

To define an ad hoc font family individually:

\fontspec{<font name>}[<font options>]

To specify features to be used for every subsequently defined font:

\defaultfontfeatures{<default font options>}
\defaultfontfeatures+{<add to default font options>}

To specify features to be used for specific fonts:

\defaultfontfeatures[<font name or switch>]{<default font options>}
\defaultfontfeatures+[<font name or switch>]{<add to defaults>}

To add features to the font family currently in use:

\addfontfeatures{<font options to add>}

Package details

Release versions of fontspec are available from CTAN: http://www.ctan.org/pkg/fontspec

Development and historical versions are available from Github: http://github.com/wspr/fontspec

Please offer suggestions and file bug reports in the issue tracker: http://github.com/wspr/fontspec/issues

If you are running TeX Live, you can update to the latest version of this package by running

tlmgr install fontspec

If you wish to manually download the latest release version from CTAN, get the pre-built TDS package and extract it into your local texmf tree:

http://mirror.ctan.org/install/macros/latex/contrib/fontspec.tds.zip

If you wish to use the latest development version from Github, either use git to obtain the bleeding edge version with

git clone git://github.com/wspr/fontspec.git

(For bleeding edge versions, see the working branch.) Having obtained the package from Github, install the package code by running

texlua build.lua install

This will compile the documentation and install all necessary files in your local texmf tree. Depending how your TeX distribution is configured you may then need to update the filename database with texhash.