Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

3 Answers

up vote 19 down vote accepted

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.

share|improve this answer
    
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 7:19
    
@Level1Coder: Well, Arial is a commercial font. You use Linux, but there's no Arial in linux distribution. –  Leo Liu Jul 24 '11 at 7:30
3  
@Leo: But there is: corefonts.sourceforge.net The corresponding package is usually named corefonts. –  Andrey Vihrov Jul 24 '11 at 7:47
3  
@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 7:53
    
+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 8:54
add comment

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 the package called uarial not arial. If you do not have this package then install it with getnonfreefonts-sys -a: http://www.tug.org/fonts/getnonfreefonts/. The script was part of TeXLive until the 2009 version. Ubuntu users should have it already installed.

share|improve this answer
    
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 7:13
2  
run sudo getnonfreefonts-sys and they will be available ... –  Herbert Jul 24 '11 at 7: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 7:27
add comment
\renewcommand{\familydefault}{\sfdefault}
\normalfont % this is required for the change to take effect
This is set in sans-serif font.
\renewcommand{\familydefault}{\rmdefault}
\normalfont % this is required for the change to take effect
Now again back to serif (roman).
share|improve this answer
    
Please do not only post code, please explain what it does. BTW: Welcome to TeX.SX! –  Kurt Sep 9 '13 at 17:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.