1

This post adds another dimension to the question posed in Trying to Imitate an Archaic Gothic Font within a Document Compiled with Pdflatex.

There are other fonts outside of TexLive that seem to provide a better approximation to the image given in the above link.

For example, enter image description here

is the output from the code

\documentclass{article}
\usepackage{fontspec}
\usepackage{scalefnt}
\setmainfont{CloisterBlack.ttf}
\begin{document}
\Large
\vspace*{55pt}
\scalefont{2.75}{Exercises}
\end{document}

when I downloaded the font CloisterBlack.ttf from dafont.com.

However, the code uses fontspec; and so, does not compile with pdflatex, and thus, could not be used, as is, in a document that must compile with pdflatex.

QUESTION: Is it possible, and if so, how, may a font such as the one alluded to, be called into a Latex document that must use pdflatex? Can the MWE code be modified to do this? Can fontspec somehow be used without resorting to either xelatex or lualatex; i.e., with pdflatex only?

Thank you.

DDS
  • 8,816
  • 4
  • 9
  • 36
  • 1
    while it's not entirely true simple answer is that you can not do that, certainly you can not use fontspec. Why can't you use lualatex?, there are very few pdflatex documents that can not be switched to lualatex with ease. – David Carlisle Feb 07 '22 at 17:05
  • 1
    You can't use fontspec with pdflatex. You can perhaps (e.g. with autoinst) prepare your font for pdflatex but this requires some skills and time (which why most people who simply want to use a font switch to lualatex or xelatex). – Ulrike Fischer Feb 07 '22 at 17:09
  • 2
    a truetype font can have thousands of characters (although that one probably doesnt) and can not be read by TeX, so you need to choose a 256 character subset and make a tfm metric file for that subset so that pdftex has a font format it can read then specify a mapping file that sets up the subset, there are tools that help do this, but essentially the answer is you have to make a pdftex compatible 8 bit font metric file first; you can not simply reference the original ttf. It is far easier to use lualatex. – David Carlisle Feb 07 '22 at 17:13
  • Thank you @Ulrike Fischer. I thought something like that might be the answer. The font will work nicely for say, a title page, as I usually compile those with xelatex; as for the document itself, it sounds like I'd better think of something else. Thanks again for your helpful comment. – DDS Feb 07 '22 at 19:22
  • Thank you @David Carlisle for your very informative comment. – DDS Feb 07 '22 at 19:23
  • @David Carlisle And thanks for your lualatex comment about changing from pdflatex with ease. I will have to try that; but in case that fails for me, it sounds like a way to use the font with pdflatex is suggested by your second comment which appears to be above my skill level. – DDS Feb 07 '22 at 19:32
  • @David Carlisle Just to let you know---my 400+ page document compiled successfully with lualatex---even with \usepackage[tracking=true]{microtype}; which in the past, I have had to comment out when using xelatex to compile an index. So, I now expect to be able to use within it, the font in question "with ease." Thank you again. – DDS Feb 07 '22 at 20:34

1 Answers1

1

a truetype font can have thousands of characters (although that one probably doesnt) and can not be read by TeX, so you need to choose a 256 character subset and make a tfm metric file for that subset so that pdftex has a font format it can read then specify a mapping file that sets up the subset, there are tools that help do this, but essentially the answer is you have to make a pdftex compatible 8 bit font metric file first; you can not simply reference the original ttf. It is far easier to use lualatex.

David Carlisle
  • 757,742
  • Many thanks. I was hoping that you would post an answer based on your comments. – DDS Feb 07 '22 at 21:42