Change font in a single paragraph [duplicate]

Possible Duplicate:
How do I use a particular font for a small section of text in my document?

How is it possible to use a new font for just a single section of a document?

I have:

\fontfamily{ppl}\selectfont

Which works fine for part way through a document changing the font. But how do I revert back?

-

marked as duplicate by Joseph Wright♦Aug 16 '11 at 16:45

You can always restrict the scope of font changing commands by enclosing the paragraph in braces

{\fontfamily{ppl}\selectfont ... }

If this is something you will be doing a lot, it would make more sense to turn it into a proper environment:

\newenvironment{ppl}{\fontfamily{ppl}\selectfont}{\par}

Then you use it like any other environment:

\begin{ppl}
Some text in the new font.
\end{ppl}
-
A good idea to end these sorts of environment with \par, I think. Especially necessary, although not in this case, if the paragraph settings will change (e.g., with \small). – Will Robertson Feb 20 '11 at 5:44

Use the fontspec package,

Then you can define new commands to select font families as \newfontfamily\cmd[font features(optional)]{Font_Name} and apply it by \NewFontName{SOME TEXT!} or {\NewFontName SOME TEXT}

An example:

\documentclass{article}
\usepackage{fontspec}
\newfontfamily\unicodefont{Lucida Grande}
\usepackage{mathpazo}
\usepackage[T1]{fontenc}
\begin{document}
A legacy \TeX\ font. {\unicodefont A unicode font.}
\end{document}

You can use the \newenvironment command to define a new environment by using this new font.

-
Note that this requires the use of XeLaTeX, not pdfLaTeX. (And strictly speaking it answers the question of how to change a font, not how to restrict the scope of the change.) – Alan Munn Feb 20 '11 at 12:52
OP did not mandate the use of PdfLaTeX, and for those who use IDE like software for LaTeX work can just switch to XeLaTeX using some easy option. This is much more neat compared to the methods that require finding the LaTeX friendly font family names, which actually look nothing like the human readable versions of them. But fontspec would just accept the human readable version, which is really convenient. – Subhamoy Sengupta Mar 9 at 23:11