Fonts – How to Fix Arial Font Error: ‘File arial.sty Not Found’ in TexLive 2019

fontstexlivetexlive-2019

I need to compile my document using a class file, provided by the journal I am submitting to.

They require Arial font, and indeed in the .cls file they provided I can find the line

\RequirePackage{arial}

I have the font installed (I think, see details below), but I receive the error message:

File 'arial.sty' not found. \RequirePackage

I am in Linux Mint, I am using TeX Live 2019/Debian, with TeXstudio GUI.

Steps done so far:

  • I have issued the command

    kpsewhich –var-value TEXMFLOCAL

to find the fonts directory.
In this directory I find,

[TEXMFLOCAL]/tex/latex/ua1/uarial.sty

which I understand is the free version of arial font.

  • I have also run the command

    sudo -H mktexlsr

to update the fonts database, but the error is still there.

  • I have tried to edit the class file and change

    \RequirePackage{arial}

into

\RequirePackage{uarial}

but then I receive the error:

File 'uarial.sty' not found. \RequirePackage
  • I have tried to use XeLaTeX or LuaLaTeX (via the "Tools -> Commands" menu of TeXstudio) which I understand would try to use my system fonts (I checked, I have the font installed in Linux), but I receive the exact same error.

Best Answer

The \RequirePackage bit searches for a package named arial which, supposedly, would set up the Arial font for use. This package is not installed by default with TeXLive, but after some digging I found it within this bundle: https://ctan.org/pkg/pclnfss .

What this arial package does is simply \renewcommand{\sfdefault}{mhv}. mhv is not Arial; if I understand things correctly, it is a virtual font that provides the metrics for the Helvetica font embedded in PCL printers. I don't think this would work correctly when generating pdf files directly, only with dvi (I tried here and LaTeX substituted it for Computer Modern). It probably made sense in some circumstances in 2004 (when this package was created), but nowadays seems to be a bad idea overall :) .

So, what should you do? Since the original author of the class did not really expect Arial, I would simply replace \RequirePackage{arial} with \RequirePackage{tgheros}, which loads TeX Gyre Heros, an Helvetica clone.

Now, notice that neither the arial and tgheros packages actually change the main font of the document to their respective fonts; they only change the sans font. Maybe the class you are using changes the default font (with \renewcommand*\familydefault{\sfdefault}), maybe not.

If you really want Arial, you should install the font in your system (it is legally available for download - in mint, you probably only need to apt install ttf-mscorefonts-installer) and then

\usepackage{fontspec}
\setmainfont{Arial}

With this, you must compile with LuaLaTeX or XeLaTeX.

Related Question