LaTeX forum ⇒ Fonts & Character SetsPalatino font not found despite being installed Topic is solved

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
chinamode
Posts: 5
Joined: Wed Feb 24, 2021 12:32 am

Palatino font not found despite being installed

Postby chinamode » Wed Feb 24, 2021 1:00 am

I'm compiling this template on Arch Linux with texlive-most installed.
As you can see from the log I'm getting the warning

LaTeX Font Warning: Font shape `TU/ppl/b/n' undefined
(Font)              using `TU/lmr/m/n' instead on input line 13.


This is because in Dissertate.cls, the following line is present:

\RequirePackage[palatino]{quotchap}

Package quotchap takes the palatino option and tries to use font ppl to write chapter numbers at the start of each chapter. I have installed the Palatino Linotype font family by copying files from a Windows installation, and since xetex is used to compile the template it should be able to use all fonts installed on my system (this is just my guess). For some reason though the font is not found, unlike EB Garamond which I also installed specifically to be able to compile this template. What am I doing wrong?

User avatar
Ijon Tichy
Posts: 446
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Wed Feb 24, 2021 9:35 am

With XeLaTeX (in opposite to LuaLaTeX) I often have problems, if fonts are not correctly installed system-wide. LuaLaTeX can use fonts in the TEXMF tree without system wide installation. XeLaTeX can't.

Usually copying font files is not the same as installing them. Are the fonts available in other applications e.g. libreoffice? Have you run fc-cache?

BTW: Instead of Palatino you could also try TeX Gyre Pagella which is part of TeX Live (but for XeLaTeX it could be necessary to install it system-wide too).

chinamode
Posts: 5
Joined: Wed Feb 24, 2021 12:32 am

Postby chinamode » Wed Feb 24, 2021 4:47 pm

Ijon Tichy wrote:With XeLaTeX (in opposite to LuaLaTeX) I often have problems, if fonts are not correctly installed system-wide. LuaLaTeX can use fonts in the TEXMF tree without system wide installation. XeLaTeX can't.

I installed some other fonts to use specifically with this template and they're in the same directory as Palatino Linotype, so that shouldn't be the issue.

Ijon Tichy wrote:Usually copying font files is not the same as installing them. Are the fonts available in other applications e.g. libreoffice? Have you run fc-cache?

Yes, the fonts are available in Libreoffice, and the other fonts I installed with Palatino get picked up by xetex. I also ran fc-cache, even with the --force option. I think the problem is specific to quotchap. I just read the documentation again and noticed that at some point it says "If no postscript font has been specified, the default is Adobe’s Bookman." Maybe Palatino has to be a postscript font instead of .ttf? How could I get the postscript version of the font and where should I put it?

Ijon Tichy wrote:BTW: Instead of Palatino you could also try TeX Gyre Pagella which is part of TeX Live (but for XeLaTeX it could be necessary to install it system-wide too).

Thanks, I'll try that. In order to use that though I'd have to use my own version of quotchap, what should I put in place of "ppl" at line 23 of the source code in order to make it work?

User avatar
Ijon Tichy
Posts: 446
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Wed Feb 24, 2021 7:26 pm

Sorry, I'm not willing to support LaTeX classes or templates without (free) license statement and brain-dead code like:
\RequirePackage{color}
\RequirePackage{xcolor}
\usepackage{hyperref}
\RequirePackage{url}

Loading color before xcolor is only nonsense. Loading url after hyperref is useless. But loading hyperref before several other packages like natbib, titlesec etc. is dangerous.

Please ask the maintainer of that template.

chinamode
Posts: 5
Joined: Wed Feb 24, 2021 12:32 am

Postby chinamode » Wed Feb 24, 2021 8:58 pm

Thank you for the tips, I applied your suggested fixes. I'm a complete LaTeX noob (that's why I'm using a template) so I couldn't notice them. Yeah, I probably should have asked the maintainer in the first place.
Regarding the license, the code used to build the template is licensed under the AGPL but I just realized that the text of the license is not present in any files other than LICENSE.

chinamode
Posts: 5
Joined: Wed Feb 24, 2021 12:32 am

Postby chinamode » Thu Feb 25, 2021 3:22 am

I ended up replacing `\f@encoding` with `T1` in the local copy of `quotchap.sty`. It's pretty ugly but finally Palatino (the one that came with TeX Live) is detected, I couldn't find an Unicode version of the font with its family code (or a way to assign code `ppl` to the font) so I don't see how else I could have done it.

User avatar
Ijon Tichy
Posts: 446
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Thu Feb 25, 2021 9:39 am

quotchap allows to redefine \chapnumfont. If the document uses a utf8 native engine, i. e. is either lualatex or xelatex based, you should replace the definition by a fontspec font selection command.

\documentclass{book}
\usepackage{fontspec}
\usepackage{quotchap}

\newfontfamily{\fontPalatino}{TeX Gyre Pagella}
\renewcommand*{\chapnumfont}{\fontPalatino\fontsize{100}{300}\selectfont\color{chaptergrey}}

\usepackage{mwe}% useful for minimal working examples only

\begin{document}
\blinddocument
\end{document}


Note: With XeLaTeX you can usually use only system-wide installed fonts. So for the above example you may have to install TeX Gyre Pagella first. With LuaLaTeX the example should run put of the box, because LuaLaTeX usually also finds fonts in the TEXMF tree of the TeX distribution.

BTW: If the used class already bases on xelatex or lualatex and loads quotchap, it should redefine \chapnumfont itself. If it does no, this would be one more "do not use this class" sign!

chinamode
Posts: 5
Joined: Wed Feb 24, 2021 12:32 am

Postby chinamode » Thu Feb 25, 2021 11:28 pm

Thank you! I installed Pagella and modified your command to
\renewcommand*{\chapnumfont}{\bfseries\fontPalatino\fontsize{100}{130}\selectfont\color{chaptergrey}}

To get the font to be bold and the right size. I didn't find a way to specify the shape to be upright like in the quotchap command, but it's the default so I guess it's not necessary.

Ijon Tichy wrote:BTW: If the used class already bases on xelatex or lualatex and loads quotchap, it should redefine \chapnumfont itself. If it does no, this would be one more "do not use this class" sign!

The class is based on xelatex and it was probably written by somebody with a Mac, so I'm guessing they didn't have my same problem because Adobe Palatino comes preinstalled on Macs, so they already had a Unicode ppl font on their system.

User avatar
Ijon Tichy
Posts: 446
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Fri Feb 26, 2021 11:01 pm

OpenType fonts do not have TeX pseudo names like ppl.


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 3 guests