[Tex/LaTex] What tips and tricks should I know when using the Georgia font in LaTeX

fontsmath-mode

Georgia is one of the most popular screen fonts around. What are some best practices for using the Georgia font, with LaTeX, in any TeX engine, in either text or math mode?

Best Answer

When I was helping a friend with her documents, there were some subtleties to the answer that no existing question quite encompassses.

Installing the Font

If you run any version of Windows or MacOS from this century, or even a little older, you have the font on your system.

If you dual-boot Linux and Windows, you can make symbolic links from georgia*.ttf in the fonts directory of your Windows partition to either /usr/local/share/fonts (to install it for all users) or ~/.fonts (to make it available for your account). This does not copy the file. If you do this, do not also install a different version as a system font!

Microsoft released Georgia for free along with its other core fonts for the web back in the late ’90s. That version of the font, 2.05, is now available as a package for Linux. Whether distributions install the Microsoft fonts by default depends on whether they agree with the Free Software Foundation’s position on gratis versus libre. You will have your own opinion on that debate, but you can check to see if it’s there with fc-match Georgia.

If not, you can install it through your package manager. On Ubuntu, the package is named ttf-mscorefonts-installer. Note that some Linux packages rename the files, e.g. from georgiaz.ttf to Georgia_Bold_Italic.ttf, so your document will only compile on all boxes if you load Georgia the deprecated way, by its display name.

If you want to purchase and download the latest version of Georgia, and you do not want to use Macs or install Windows 10 on every box that needs it, Microsoft also sells workstation licenses for the Georgia font family. (This is not good value for money, but I mention it for completeness.)

In Text Mode on LuaLaTeX and XeLaTeX

You can load the TrueType font in fontspec:

\documentclass{article}
\usepackage{fontspec}
\usepackage{microtype}
\usepackage{lipsum}

\defaultfontfeatures{ Scale=MatchLowercase }
\setmainfont{Georgia}[Scale = 1.0]

\begin{document}
  \lipsum
\end{document}

I personally recommend loading microtype on LuaLaTeX, as this enables font expansion and drastically cuts down on the number of hyphenated lines. Not everyone likes font expansion when printed at high resolution, but I find it looks much better on screens.

The default settings might or might not be to your liking. You can turn off the hanging punctuation in the right margin with \usepackage[protrusion=false]{microtype}. You might also prefer to change the paragraph style with \setlength\parskip{\baselineskip} (to insert a blank line between paragraphs) or tweak the value of \parindent.

Georgia with unicode-math

If you also want to use Georgia in math mode, load it with the range= option of \setmathfont:

\documentclass[varwidth,preview]{standalone}
\usepackage{amsmath}
\usepackage[math-style=ISO]{unicode-math}
\usepackage{microtype}

\defaultfontfeatures{ Scale=MatchLowercase }
\setmainfont{Georgia}[Scale = 1.0]
\setmathfont{Asana Math}
\setmathfont[range={up,`∏,`∑,`∙,`√,`∞},
             script-features={}, sscript-features={}
            ]{Georgia}
\setmathfont[range=it,
             script-features={}, sscript-features={}
            ]{Georgia Italic}
\setmathfont[range=bfup,
             script-features={}, sscript-features={}
            ]{Georgia Bold}
\setmathfont[range=bfit,
             script-features={}, sscript-features={}
            ]{Georgia Bold Italic}

\newcommand\dxdy[2]{\; \symup{d}{#1} \, \symup{d}{#2}}
\newcommand{\xzero}{\symbfit{x}_{\symbfup 0}}
\newcommand{\yzero}{\symbfit{y}_{\symbfup 0}}

\begin{document}
\begin{minipage}{20em}
The quick brown fox jumps over the lazy dog.  If it jumps with upward velocity
\(\symbfit{v}\) at altitude \(\yzero\), its height at time t is given by
\[ \gamma(t) = \iint_0^t -\symbfit{g} \dxdy{t}{t} =
   - \frac{\symbfit{g} t^2}{2} + \symbfit{v} t + \yzero \]

The dog, being lazy, wants to look at the fox with minimal effort.  It should
rotate its head to an angle of

\[ \begin{cases}
     \frac{\muppi}{2}
       & \mbox{if \(\symup\Delta\symbf{x} t = \xzero\)} \\
     \tan^{-1} \left( \frac{\gamma(t)}{\symup\Delta\symbf{x} t - \xzero } \right)
       & \mbox{otherwise}
   \end{cases} \]

\end{minipage}
\end{document}

Georgia + Asana Math sample

Again, there are some subtleties. Georgia does not support the lining/old-style numbers font feature, so you cannot turn its old-style numbers off. You might therefore prefer to load it with the range up/{latin, Latin, greek, Greek} and bfup/{latin, Latin, Greek, greek}, so as to continue to use the digits from your math font.

Georgia also contains a few math symbols, including: ∂ ∆ ∏ ∑ ∙ √ ∞ ∫ ≈ ≠ ≤ ≥

You might or might not want to enable these. For example, you might not want to load ≈ in a different font from ≉ if you use both in your document, or use symbols that are not extensible. You can add or remove the symbols you want from the range=.

Using Georgia with a Legacy NFSS Math Font in a Modern TeX Engine

You can load mathastext after setting your main font to Georgia. Another option for XeLaTeX only is mathspec. You might try Georgia in combination with newpxmath or stix2.

Using Georgia in Text Mode in PDFLaTeX

I personally recommend that you use fontspec or unicode-math whenever you can and the legacy toolchain whenever you have to. If you have to, the winfonts package allows you to do this:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{winfonts}
\usepackage[utf8]{inputenc} % The default since 2018
\usepackage{microtype}
\usepackage{lipsum}

\begin{document}
\fontfamily{georgia}\selectfont
\lipsum
\end{document}

Although all it does is change the text encoding, I throw in a \usepackage{winfonts} so that anybody who doesn’t have the right package gets an error message telling them what to install.

This does not support math mode or PostScript output, since the TrueType fonts do not have PostScript outlines.

Using Georgia in Legacy Math Mode

There is a rudimentary package that supports both math mode and PostScript, mathgifg. It requires you to, among other things, convert the TTF files to Type 1 yourself.