\fontcommand. (The other difference is that a Plain TeX input file will be in ASCII, a XeTeX input file in UTF-8.)
XeTeX can use fonts which are installed in your OS’s font directories, using the font name, e.g. "Times New Roman". Or it can use fonts from elsewhere on your system, using the font file name in square brackets, e.g. "[times.ttf]". To use an installed font you use the font name, followed by any font features you want to use, in quotation marks, followed by a sizing command, e.g.
\font\palaosf="Palatino Linotype:+onum" at 10pt
selects the font Palatino Linotype with old style figures (
onum) at 10 points.
\font\palaosfsc="Palatino Linotype:+smcp,+onum" at 10pt
10pt Palatino with small caps and old style numbers.
You can use a single digit or upper and lower case letters to name a font, but not letters and digits together. So
\Large are valid font names;
\10point is not.
/BUse the bold version of the selected font.
/IUse the italic version of the selected font.
/BIUse the bold italic version of the selected font.
/S=x Use the version of the selected font corresponding to the optical size x pt.
/AATExplicitly use the AAT renderer (Mac OS X only).
/OTExplicitly use the OpenType renderer (new in 0.9999).
/GRExplicitly use the Graphite renderer.
/ICUExplicitly use the ICU renderer (deprecated since 0.9999).
\font\pala="Palatino Linotype" at 12pt% regular font
\font\palai="Palatino Linotype/I" at 12pt% italic font
\font\palab="Palatino Linotype/B" at 12pt% bold font
\font\palabi="Palatino Linotype/BI" at 12pt% bold italic font
\font\palasc="Palatino Linotype:+smcp" at 12pt% small cap font
I/B/BIswitches (provided that your font has the glyphs for italic small caps. Lots of fonts just have regular and bold small caps.).
To use fonts not installed in the OS font library, you type the font file name enclosed in square brackets and quote marks. Note that the
I/B/BI switches do not work here – you have to use the file name of the italic or bold fonts:
\font\rmten="[lmroman10-regular]" at 10pt
\font\italten="[lmroman10-italic]" at 10pt
this will search your TeX installation for the above named fonts.
You can also use fonts located in a folder anywhere on your computer:
\font\pala="[H:/myfonts/pala.ttf]:+onum" at 10pt
\font\palai="[H:/myfonts/palai.ttf]:+onum" at 10pt
\font\palab="[H:/myfonts/palab.ttf]:+onum" at 10pt
\font\palabi="[H:/myfonts/palabi.ttf]:+onum" at 10pt
\font\palasc="[H:/myfonts/pala.ttf]:+onum,+smcp" at 10pt
\font\palasci="[H:/myfonts/palai.ttf]:+onum,+smcp" at 10pt
\font\palascb="[H:/myfonts/palab.ttf]:+onum,+smcp" at 10pt
\font\palascbi="[H:/myfonts/palabi.ttf]:+onum,+smcp" at 10pt
these fonts are in a folder ‘myfonts’ on a USB stick (drive H: on my computer).
See the file xetex_fonts for further details: xetex_fonts.tex, xetex_fonts.pdf
(OpenType examples from the EB Garamond Specimen PDF →)
I was originally going to use Palatino Linotype in ‘xetex_fonts’, but not every system has this font (it’s bundled with MS Windows). Anyway here are the files pala.tex, pala.pdf showcasing some OpenType features in this font.
The creator of this font has also written a guide to typesetting multilingual documents with XeLaTeX: xetextt.pdf
Junicode. Unicode font for medievalists. Latin, polytonic Greek, Runic, Gothic.
EB Garamond: Based on the work of Claude Garamond and Robert Granjon. Latin, polytonic Greek, Cyrillic, IPA.
Minion Pro (serif), Myriad Pro (sans serif). These two fonts are included with the download of Adobe’s Reader. On a Windows system, they can be found in a folder called Resource in the Adobe Reader folder in Program Files. They both support a pan-European character set (Minion Pro also has polytonic Greek glyphs).
Gentium – ‘a typeface for the nations’. Very wide coverage of Latin, Greek, Cyrillic, IPA, Phonetic extensions. Gentium Plus has a wider range of characters than Gentium or Gentium Basic. (But Gentium Basic has bold and bold italic variants.)
GNU FreeFont (FreeSerif, FreeSans, FreeMono) Open-source versions of Times, Helvetica, Courier. Very wide coverage of scripts and symbols (over 8000 glyphs in FreeSerif).
Everson Mono. Monospaced sans serif font. Contains seemingly all non-Han scripts in the Unicode standard.
Fonts by Séamas Ó Brógáin: Clara (an old-style font), Florea (fleurons and ornaments), Gadelica (a Gaelic typeface), Germanica (a Black Letter face) and Valida (a bar code font).
Greek Font Society: lots of Greek fonts.
Fell fonts by Igino Marini
Old Standard, Theano fonts: Fonts by Alexey Kryukov. Old Standard has polytonic Greek and very wide coverage of Cyrillic. Theano Didot has a Didot Greek font, Theano Modern a Porson Greek font and Theano Old Style an old-style Greek font with a lot of ligatures.
Unicode Fonts for Ancient Scripts: Fonts covering ancient scripts of the eastern Mediterreanean (and Mayan). Also a Unicode symbol font (Symbola) and a font covering Byzantine musical symbols (EEMusic).
Ralph Hancock’s fonts. Some fonts covering Latin and Greek scripts by Ralph Hancock, author of the Antioch keyboard utility for Microsoft Word.
Sorts Mill Goudy (Goudy Old Style) by Barry Schwartz
Also Sorts Mill Kis (based on Sol Hess’s version of ‘Janson’)
Coelacanth: OpenType version of Bruce Roger’s Centaur font. Many weights and optical sizes available. Under development.
Fixedsys Excelsior: TrueType Unicode version of the MS DOS fixedsys font.
Computer Modern Unicode http://sourceforge.net/projects/cm-unicode/
Latin Modern fonts http://www.gust.org.pl/projects/e-foundry/latin-modern
These are both conversions of the TeX Computer Modern fonts to the OpenType format. Computer Modern Unicode has wider coverage of scripts (Greek, Cyrillic, IPA), but Latin Modern has more optical size variants.
A lot of the fonts listed above are included in TeX Live and other TeX distros.
The file ‘opentype-info.tex’ (→) gives a listing of the OpenType font features, scripts and languages supported by whichever font you have chosen to run it on.