127

In preamble, I have:

\renewcommand{\familydefault}{\sfdefault}
\usepackage{arial}

but it doesn't work.

How do I set my font to Arial throughout the entire document?

UPDATE:

In short, both answers work.

It really depends on the environment. If using LaTeX and don't mind using a cloned font then choose Herbert's answer. If using XeLaTex and want to use the authentic font then choose Leo's.

Level1Coder
  • 7,029

3 Answers3

143

Arial is not installed in TeX Live, I'm not sure about MiKTeX. You can use helvet package instead.

\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}

If you use XeLaTeX or LuaLaTeX, you can use TrueType Arial font installed in your Windows/Mac:

\usepackage{fontspec}
\setmainfont{Arial}

In Ubuntu, Arial can be installed by a Synaptic Package named ttf-mscorefonts-installer.

Leo Liu
  • 77,365
  • I'm using Ubuntu 10.04 and have texlive-full 2009-7 installed. I see XeTeX & LuaTeX installed but your method doesn't work. – Level1Coder Jul 24 '11 at 07:19
  • 1
    @Level1Coder: Well, Arial is a commercial font. You use Linux, but there's no Arial in linux distribution. – Leo Liu Jul 24 '11 at 07:30
  • 3
    @Leo: But there is: http://corefonts.sourceforge.net/ The corresponding package is usually named corefonts. – Andrey Vihrov Jul 24 '11 at 07:47
  • 8
    @Level1Coder: Arial is very similar to Helvetica, Arial and Helvetica are both commercial fonts. helvet package actually uses Nimbus Sans font (a Helvetica clone); uarial uses URW A030 font (an Arial clone). Most cases, helvet package will suffie. If you want to use real Arial, you must get the TrueType/OpenType font from Windows/Mac and install it in your Linux OS, then use it with XeLaTeX/LuaLaTeX. – Leo Liu Jul 24 '11 at 07:53
  • 1
    +1 to Andrey for mentioning corefonts.

    After experimentation, I found under Ubuntu Synaptic Package named ttf-mscorefonts-installer. After installing this, Leo's answer works!

    Changed my mind to use Leo's answer because of the use of authentic fonts from MSCoreFonts. And also because of frequent use of Chinese, XeLaTex seems to be the best tool to handle Chinese characters. (Was planning to settle with PDFLaTeX to create intermixing English/Chinese documents)

    – Level1Coder Jul 24 '11 at 08:54
  • I had read that ´fontspec´ shouldn't use with Koma classes e.g. scrbook – Doan Dec 29 '19 at 23:07
  • What if you compile with pdfLaTeX? – Someone Apr 14 '20 at 13:22
41

Use it this way:

\documentclass{article}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{uarial}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{blindtext}

\begin{document} \blindtext \end{document}

but you must have installed the package called uarial (not arial) beforehand. If you do not have this package then install it with sudo getnonfreefonts --sys -a, which will install all available non-free fonts into your system (more info here). The script was part of TeXLive until the 2009 version. Ubuntu users should have it already installed.

Olivier
  • 208
  • 3
    uarial, urw-arial in urw bundle is not available in TeX Live and MiKTeX, it is necessary to install the font package manually. I guess it would be a little difficult for newbies. – Leo Liu Jul 24 '11 at 07:13
  • 2
    run sudo getnonfreefonts-sys and they will be available ... –  Jul 24 '11 at 07:17
  • Downloaded all fonts with this command sudo getnonfreefonts-sys -a Arial is rendering in my PDF now, awesome and thanks! – Level1Coder Jul 24 '11 at 07:27
  • A quick 2015 follow up on @Leo Liu's comment: this solution worked for me in RStudiocompiling with pdfLaTeX without the need to install any packages manually. Thanks for this answer! – Adam Smith Sep 24 '15 at 20:00
  • 2
    I tried \usepackage{uarial} in MiKTeX and it was installed automatically (with the usual prompt). – Evgeni Sergeev Feb 22 '17 at 04:18
  • I'm a newbie in Ubuntu, but I could follow the installation steps as stated in https://www.tug.org/fonts/getnonfreefonts/ – EA304GT Jul 10 '17 at 16:59
  • 1
    True, it changed with TL 2016, if I am right. –  Nov 15 '17 at 08:06
  • 2
    10 years later, and this worked for me! Great solution! – V-Red Mar 16 '21 at 22:02
5

I struggled with this forever. Finally found an article that showed me these two lines of code:

\renewcommand{\rmdefault}{phv} % Arial
\renewcommand{\sfdefault}{phv} % Arial

Only thing that worked for me, after hours of struggling with luatex and xelatex.

This answer only loads a Helvetica clone, not true Arial. If you need true Arial for whatever reason this won't work.

Blairg23
  • 223
  • 3
    Note that these instructions load a Helvetica clone, not true Arial. Because Arial is itself a clone of Helvetica, the result may be good enough for your requirements. Your answer should make clear(er), though, that it answers the OP's query only approximately, not exactly. – Mico May 16 '17 at 02:34
  • Hmm, good call. I didn't think of that! – Blairg23 May 16 '17 at 21:03
  • dead link http://cambio.name/personal/content/how-use-arial-font-latex – Alessandro Cuttin Sep 30 '22 at 12:19
  • Good enough for me. How dare SSHRC (a Canadian gov't research funding agency) demand Arial font if it's not free and open?! – CPBL May 23 '23 at 17:42