I'd like to use 3-4 different specific system fonts (e.g., Georgia, HelveticaNeui Light, and Lucida Sans) with certain font sizes for different sections of a page. How would I do this?

Edit: Thanks for the responses. I saw the fontspec package but the examples I found defined in the preamble \setmainfont{}, \setsansfont{}, etc. I couldn't figure out how to define a fontfamily and then reference it for a particular section. Here's an example:




\section{Georgia}%here define font

This text shows in Georgia.

\section{Lucida Sans}%

This text shows in Lucida Sans

\section{HelveticaNeue Light}%here define font

This text shows in Helvetica Neue Light

  • Welcome to TeX.sx! Apr 14, 2013 at 20:00
  • 1
    Have you looked into the \newfontfamily directive of the fontspec package?
    – Mico
    Apr 14, 2013 at 20:15
  • Here's an example of pretty much exactly what you want to do: Change section fonts.
    – Alan Munn
    Apr 14, 2013 at 20:32
  • Thanks, Alan. I saw that example which defines the formatting by section, subsection, etc. I'm looking to specify formatting for different sections - I'm used to styling in HTML/CSS where to do this you'd assign each paragraph to different classes and then for each of those classes define the font size, font family, color, margin, etc.
    – jack
    Apr 14, 2013 at 21:01
  • @Jack The principle is the same. You can define various section-like headings using titlesec. I'll post an example shortly. But reading your question more carefully, I'm wondering, do you want the text within a section to be of a different font, or the section heading, or both?
    – Alan Munn
    Apr 14, 2013 at 21:08

1 Answer 1


If you just want chunks of text to be a different font you can simply set up environments for them using whatever semantics makes sense for your document. The main thing to remember is that you should use \newfontfamily to define a font switching command for each font rather than using the \fontspec command directly. For example:

% Compile with XeLaTeX or LuaLaTeX



This text is in Calibri
This text is in Cambria
This text is in Georgia

output of code

  • What happens if you use pdflatex? Sep 30, 2013 at 16:14
  • 1
    @MarioS.E. You don't. fontspec requires either XeLaTeX or LuaLaTeX.
    – Alan Munn
    Sep 30, 2013 at 19:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .