# Different font; what are my options?

I'm trying to build a LaTeX document class, so that documents for my association can be easily produced using LaTeX. The problem is, the documents use a very specific branding that includes a logo and page headers using the Gill Sans font.

As you are likely aware, using a custom font in LaTeX is a world of pain (as expressed in various questions here and on superuser).

I have stumbled upon Gillius ADF, an open font that is inspired on Gill Sans. However, it is noticeably different, and not really an option for me.

Many suggestions come down to using either LuaTeX or XeTeX. This is far from ideal; sure, I would be able to switch, but the idea is that this document class should be usable for people who have only limited experience with LaTeX.

An alternative that came to mind was to somehow generate PDF files of the page headers on the fly, by replacing texts in existing included PDF files.

I'm looking for any and all suggestions; what is a robust and user-friendly way to include a non-standard font in a LaTeX document class?

• xelatex or luatex are as easy to use as pdflatex (in most cases the input is the same) so if you are in a community that is guaranteed to have that font, just using it via fontspec loaded in the class should "just work" Feb 28 '15 at 18:48
• Also from the typical (Windows) GUI programs? I'm compiling from the command-line, but that's not the case for everyone, I'm afraid. Feb 28 '15 at 19:22
• I use XeLaTeX daily on a Windows system without a problem. Only a few lines of the preamble are diffrent: no \inputencoding, as it expects utf8, no fontenc, as its uses the system fonts specified with fontspec(if nothing is specified, it uses the Latin Modernfonts. Feb 28 '15 at 19:51
• I just noticed that there's actually a 'compile with XeLaTeX' option is standard programs. Nice! Feb 28 '15 at 19:53
• Please tell us (a) which TeX distribution and vintage will be available to the participants in your association and (b) which front-end editor, or editors, will be used.
– Mico
Feb 28 '15 at 21:15

Many TeX-aware front-end programs nowawadays make it as easy to compile a document under either XeLaTeX or LuaLaTeX as it is under pdfLaTeX. Quite a few will even switch automatically to XeLaTeX or LuaLaTeX, respectively, if directives such as either

% !TEX TS-program = xelatex


or

% !TEX TS-program = lualatex


are provided at the top of the file, i.e., before \documentclass.

You mention that the users of your system will, in general, have only very limited experience with LaTeX. If so, they probably won't be aware of the differences between pdfLaTeX, XeLaTeX, and LuaLaTeX anyway and probably won't even care much at all -- as long as you give them adequate tools to let them do their jobs.

% !TEX TS-program = lualatex
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Gill Sans}  % name of font may vary from system to system
\begin{document}
I'm trying to build a LaTeX document class, so that documents for my association
can be easily produced using LaTeX. The problem is, the documents use a very
specific branding that includes a logo and page headers using the Gill Sans font.
\end{document}


(The preceding was compiled using MacTeX2014 on a system running MacOSX 10.10.2 and using TeXworks as the front end.)

xelatex or luatex are as easy to use as pdflatex (in most cases the input is the same once the fonts are set up) so if you are in a community that is guaranteed to have that font, just using it via fontspec loaded in the class should "just work"

\documentclass{article}

\usepackage{fontspec}
\setmainfont{Gill Sans Ultra Bold}

\begin{document}

A bit gross to use as a body font, but\ldots

\end{document}