2

I want to set the font of the text inside a frame, and also the ones inside a block to FranklinGothic. I downloaded the .ttf files for this font, and I put them on the local path, and also installed them at /usr/share/fonts/truetype/franklingothic. Then I use the following header in the tex file

\documentclass{beamer}
\usepackage{fontspec}
\mode<presentation>
{
    \definecolor{mygreen}{cmyk}{0.82,0.11,1,0.25}
    \usetheme{default}      % or try Darmstadt, Madrid, Warsaw, ...
    \setbeamertemplate{navigation symbols}{}
    \setbeamertemplate{caption}[numbered]
    \setbeamertemplate{blocks}[rounded][shadow=false]
    \setbeamercovered{transparent}
    \setbeamertemplate{frametitle}
    {
        \begin{beamercolorbox}[ht=2.9em,wd=0.8\paperwidth]{frametitle}
            \insertframetitle
        \end{beamercolorbox}
    }
    \definecolor{cool_blue}{RGB}{35,137,154}
    \definecolor{cooler_blue}{RGB}{0,72,81}
    \usefonttheme{structurebold}
    \setbeamercolor{titlecolor}{fg=cool_blue}
    \setbeamercolor{titlelike}{parent=titlecolor}
    \setbeamercolor{normal text}{fg=cooler_blue}
    \usebeamercolor[fg]{normal text}
    \setbeamerfont{frametitle}{family={\fontspec{calibri}}}
    \setbeamerfont{example text}{family={\fontspec{FranklinGothic}}}
}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\begin{document}
\begin{frame}{Background}
sample text
\end{frame}
\end{document}

Yet, I don't see the FranklinGothic font inside the frame

3

I have only the ITC FranklinGothic. Change it to your font name.

\documentclass{beamer}
\usepackage{fontspec}
\newfontfamily\Calibri{Calibri}
\newfontfamily\Gothic{FranklinGothicLT-Medium}

\definecolor{mygreen}{cmyk}{0.82,0.11,1,0.25}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
\setbeamertemplate{blocks}[rounded][shadow=false]
\setbeamercovered{transparent}
\definecolor{cool_blue}{RGB}{35,137,154}
\definecolor{cooler_blue}{RGB}{0,72,81}
\usefonttheme{structurebold}
\setbeamercolor{titlecolor}{fg=cool_blue}
\setbeamercolor{titlelike}{parent=titlecolor}
\setbeamercolor{normal text}{fg=cooler_blue}
\usebeamercolor[fg]{normal text}
\setbeamerfont{frametitle}{family=\Calibri}
\setbeamerfont{example text}{family=\Gothic}
\setbeamertemplate{frametitle}{%
    \begin{beamercolorbox}[ht=2.9em,wd=0.8\paperwidth]{frametitle}
        \insertframetitle
    \end{beamercolorbox}%
}
\usepackage[english]{babel}

\begin{document}
\begin{frame}{Background}
    sample text

\begin{Example}
    foo
\end{Example}
\end{frame}
\end{document}

enter image description here

the used and included fonts are:

$ pdffonts test.pdf
name                                 type             
------------------------------------ ----------------  
BCUJUB+Calibri-Bold                  CID TrueType     
BSEWJS+LMSans10-Regular-Identity-H   CID Type 0C      
BWQWZA+FranklinGothicLT-Heavy        CID TrueType     
| improve this answer | |
  • Thank you for the answer. How did you find out the exact name of font 'FranklinGothicLT-Medium' ? I mean, how should I check the name under which it is stored in my system? – Kiran Sagar May 4 '19 at 20:40
  • There is a small program: otfinfo -I <filename with path> which shows you the internal names. However, you can use the file name instead. I prefer the symbolic names. – user187802 May 5 '19 at 4:13
  • I still don't have the Gothic font. Also, I think your output too doesn't have the Gothic font, it is the default beamer font – Kiran Sagar May 6 '19 at 10:34
  • In my example Background is in Calibri, sample text in the default latin modern sans and foo as part of the Example environment in Franklin Gothic. That was what you wanted! – user187802 May 6 '19 at 11:31
  • yes, that's what I wanted. But I believe the foo in your output is not Franklin Gothic, but it is the default font of beamer – Kiran Sagar May 7 '19 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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