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.

How to define a new font family on Beamer?

I've tried this way, but I get Undefined control sequence :

\newfontfamily\fff{xxx.ttf}

Any good idea, please?

Thanks in advance!

share|improve this question
1  
Are you compiling with Lua- oder XeLaTeX? Or normal pdfLaTeX? It would be best, if you upload a compilable document, just one frame, one word, and the packages needed here. –  LaRiFaRi May 15 at 8:45
    
@LaRiFaRi, pdfLaTeX. –  Djouma May 15 at 8:45
1  
@Djourma The command \newfontfamily is part of the package fontenc You are not able to use this with pdfLaTeX. If you are willing to change to LuaLaTeX, I can show you an answer. If not, you have to search for packages which load the font you like. –  LaRiFaRi May 15 at 8:48
    
@LaRiFaRi, I've included that package using the T1 option. But, in my case i'm note able to compile my presentation with another compiler. I can only use here pdfLaTex. In fact I'm just trying to reproduce this font style. If you have another suggestion to get arround this situation, you can post it as an answer. –  Djouma May 15 at 8:51
3  
@LaRiFaRi meant the fontspec package, not fontenc. And getting this font to work with pdflatex is possible but not easy. Can you really not use xelatex? –  Ulrike Fischer May 15 at 8:55

1 Answer 1

\documentclass[12pt]{beamer}
\usepackage[T1]{fontenc}
\usepackage{biblatex}
\newcommand\palatino{\fontfamily{ppl}\selectfont}

\begin{document}

\begin{frame}{\palatino Title in Palatino}{Subtitle}
foo
\end{frame}

\end{document}

A list of the family names for pdftex is available here: http://mirrors.ctan.org/info/fontname/fontname.pdf (p. 30ff)

If you want to use a TrueType or OpenType font then use xelatex or lualatex. Then it is easier, for example:

\newfontfamily\DVS{Deja Vu Sans}
share|improve this answer
    
Isn't possible to use a local ttf file as a font style with pdfLaTeX ? –  Djouma May 15 at 8:59
1  
Yes, but that is not easy. See devnotcorp.wordpress.com/2011/06/10/… –  Herbert May 15 at 9:01

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.