# latex, xetex - and zapfino

I know how to use LaTeX (not an expert, but still quite some experience - wrote couple of papers and my thesis, can make TikZ pictures etc.), but I don't have the slightest idea, what XeTeX, LuaTeX, etc. are.

For an invitation card I'd like to design I found this beautiful font named zapfino. But it's for XeTeX or LuaTex. This website has a nice example: http://nitens.org/taraborelli/latex#glyph I downloaded that tex code, but I can't compile the code on my ubuntu machine (with texlive) - neither using LaTeX (no surprise there), nor xetex, nor luatex, nor xelatex. I always have issues. Best works xelatex, it only complains about the font not being found before it exits. I downloaded the font from <removed> and put the .otf file into /usr/local/share/texmf (where the TEXMFLOCAL variable points to), but that does not change anything. What do I do wrong?

Is there a possibility to make zapfino work with latex? and if not, how can I compile that small example on my machine, what do I have to do? Furthermore - is there a way of combining XeTeX (for the font) with LaTeX (for TikZ-tricks)?

• Put the font where you would put fonts available to your system as a whole (i.e., where you would put them for use with any other application). This is usually /usr/share/fonts on Linux systems. Then XeLaTeX should find them. Also make sure your document is encoded UTF-8 and don't load inputenc or fontenc but use fontspec. – Alan Munn Jun 3 '16 at 23:20
• Zapfino is a commercial font; sites that offer it as a free download may be giving you a file that’s problematic in more ways than one. – Thérèse Jun 3 '16 at 23:35
• @AlanMunn: I did put the .otf file into /usr/share/fonts, but nothing changed. Do I have to run some update-command? – dps_kane Jun 4 '16 at 0:05
• @Thérèse: in a different stackexchange thread some user provided an example document and wrote underneath that he got the font from that website - unfortunately he did not explain how the installation worked. But from that I assume that in some way this font file can be used. – dps_kane Jun 4 '16 at 0:07
• Somewhat related: Can one set a specific font variant in xelatex for uppercase letters only? Separately: Which TeX distribution and which operating system do you use? – Mico Jun 4 '16 at 6:04

The file is quite old, in comparison to the big developments on XeTeX and fontspec that have been made in the last eight years.

Here's a fixed version that works well. Note that I'm on a Mac OS X machine, where Zapfino is provided along with the operating system. However, the font is not free, so you have to buy it in order to be able of exploiting its features.

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

% Dario Taraborelli (2008)
% The Beauty of LaTeX
% URL: http://nitens.org/taraborelli/latex
% Some rights reserved: CC-BY-SA
% (modified by egreg for TeX.StackExchange.com)

\documentclass[11pt]{article}
\usepackage{fontspec, graphicx}
\usepackage[usenames]{color}
\usepackage[
pdftitle={The Beauty of LaTeX},
pdfauthor={Taraborelli, Dario}
]{hyperref}

\definecolor{Gray}{rgb}{.7,.7,.7}
\definecolor{lightblue}{rgb}{.2,.5,1}

\newcommand{\red}{\color{red}}
\newcommand{\lbl}{\color{lightblue}}

\setmainfont{Hoefler Text}

\newfontfamily{\zapfinofont}{Zapfino}[
Ligatures={Common, Rare},
Variant=1,
]

\begin{document}

\begin{center}
\fontsize{25pt}{30pt}\zapfinofont

{\red d}roo{\lbl g}\hfill{\reda d}roo{\lbla g}

{\redb d}roo{\lblb g}\hfill{\redf d}roo{\lblf g}

{\redc d}roo{\lblc g}\hfill{\redd d}roo{\lbld g}

{\rede d}roo{\lble g}\hfill{\redg d}roo{\lblg g}
\end{center}

\vfill

\begin{flushright}
D. Taraborelli (2008),
\href{http://nitens.org/taraborelli/latex}{The Beauty of \LaTeX}\\
\emph{Some rights reserved}.

• @dps_kane Quite likely your system has an old TeX distribution. Try moving {Zapfino} after ] – egreg Jun 5 '16 at 8:17
• @egreg great example! But how can I get the e.g. \addfontfeatures{Variant=2} working with LuaLaTeX? – LukasCB Dec 10 '16 at 20:42
• @LukasCB According to the fontspec manual, Variant is only for Mac OS X AAT fonts; this technology is not supported by luaotfload. – egreg Dec 10 '16 at 20:52