Comprehensive TeX Archive Network

Direc­tory macros/latex/contrib/fontspec


The FONTSPEC pack­age

The fontspec pack­age pro­vides an au­to­matic and uni­fied in­ter­face for load­ing fonts in . and Lua (the lat­ter through the luaotfload pack­age) al­lows a di­rect in­ter­face to fonts which may be loaded by their name or file­name, so no man­ual font in­stal­la­tion is re­quired.

This pack­age also pro­vides ac­cess to the large num­ber of font fea­tures avail­able with OpenType (and other) fonts, in­clud­ing up­per and lower case num­bers, pro­por­tional and monospaced num­bers, swash let­ters, lig­a­ture con­trol, and many many oth­ers.

See the doc­u­men­ta­tion fontspec.pdf for full in­for­ma­tion.

Sum­mary of user com­mands

To de­fine com­mands for se­lect­ing fonts ef­fi­ciently through a doc­u­ment:

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

To se­lect the de­fault doc­u­ment fonts:

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

To de­fine an ad hoc font fam­ily in­di­vid­u­ally:

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

To spec­ify fea­tures to be used for ev­ery sub­se­quently de­fined font:

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

To spec­ify fea­tures to be used for spe­cific fonts:

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

To add fea­tures to the font fam­ily cur­rently in use:

\addfontfeatures{<font options to add>}

Pack­age de­tails

Re­lease ver­sions of fontspec are avail­able from CTAN: http://www.ctan.org/pkg/fontspec

Devel­op­ment and his­tor­i­cal ver­sions are avail­able from Github: http://github.com/wspr/fontspec

Please of­fer sug­ges­tions and file bug re­ports in the is­sue tracker: http://github.com/wspr/fontspec/is­sues

If you are run­ning Live, you can up­date to the lat­est ver­sion of this pack­age by run­ning

tlmgr install fontspec

If you wish to man­u­ally down­load the lat­est re­lease ver­sion from CTAN, get the pre-built TDS pack­age and ex­tract it into your lo­cal texmf tree:


If you wish to use the lat­est de­vel­op­ment ver­sion from Github, ei­ther use git to ob­tain the bleed­ing edge ver­sion with

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

(For bleed­ing edge ver­sions, see the working branch.) Hav­ing ob­tained the pack­age from Github, in­stall the pack­age code by run­ning

texlua build.lua install

This will com­pile the doc­u­men­ta­tion and in­stall all nec­es­sary files in your lo­cal texmf tree. Depend­ing how your dis­tri­bu­tion is con­fig­ured you may then need to up­date the file­name database with texhash.


Copy­right 2004–2017 Will Robert­son <will.robert­son@la­tex-project.org> Copy­right 2009–2010 Khaled Hosny <khaled­hosny@eglug.org>

Distributable un­der the Project Public Li­cense, ver­sion 1.3c or higher (your choice). The lat­est ver­sion of this li­cense is at: http://www.la­tex-project.org/lppl.txt

This work is "main­tained" (as per LPPL main­te­nance sta­tus) by Will Robert­son.

Down­load the con­tents of this pack­age in one zip archive (966.5k).

fontspec – Ad­vanced font se­lec­tion in XeLaTeX and Lua

Fontspec is a pack­age for XeLaTeX and Lua. It pro­vides an au­to­matic and uni­fied in­ter­face to fea­ture-rich AAT and OpenType fonts through the NFSS in run­ning on or Lua en­gines.

The pack­age re­quires the l3k­er­nel and xparse bun­dles from the 3 de­vel­op­ment team.

Bug trackerhttp://github.com/wspr/fontspec/is­sues
Li­cense The Project Public Li­cense 1.3c
Main­tainerWill Robert­son
TDS archivefontspec.tds.zip
Con­tained inTeX Live as fontspec
MiKTeX as fontspec
Topics font se­lec­tion schemes
, ma­te­rial sup­port­ing it, and pack­ages re­quir­ing it
Lua and pack­ages that re­quire it
Guest Book Sitemap Contact Contact Author