Using Custom TeX Fonts (Lucida and Minion Pro) in Quarto
Motivation
I found a copy of Lucida and Minion Pro that I bought back in 2013 and that I had on my Google Drive. I really like these fonts but the setup is a bit challenging. Here I will show how to use them in a Quarto document in 2023.
About the fonts
See varsityblues for a set of complete LaTeX templates to be used with R Markdown or Quarto.
You can compare the differences here:
Lucida is a commercial font that can be purchased from TUG. After purchasing the font, you will receive zip files with the fonts and the macros (lucida-type1.zip
and lucimacros.zip
).
Minion Pro comes with Adobe Illustrator or can be purchased by separate from Adobe.
If you email me, I can send you the PFB files for Minion Pro if you can prove that you have legally obtained the font. I believe in Open Source, but I also believe in respecting the rights of the creators of the fonts.
Instructions
Clone the repository
I made a repository with a 1-line script to get the setup done.
Either
git clone --depth 1 https://github.com/pachadotdev/lucida-minion-tex.git
or
git clone --depth 1 git@github.com:pachadotdev/lucida-minion-tex.git
Copy Lucida files
Put the corresponding zip files for Lucida in the root folder of this repository. These files are lucida-type1.zip
and lucimacros.zip
.
Copy Minion Pro files
If you only have the font in OTF format
Create the minion
folder in the root of this repository and put the Minion Pro fonts in OTF format into it. This corresponds to the next files:
MinionPro-BoldCnIt.otf
MinionPro-BoldCn.otf
MinionPro-BoldIt.otf
MinionPro-Bold.otf
MinionPro-It.otf
MinionPro-MediumIt.otf
MinionPro-Medium.otf
MinionPro-Regular.otf
MinionPro-SemiboldIt.otf
MinionPro-Semibold.otf
If you are on Ubuntu/Debian, the script from the next section will install lcdf-typetools
, which provides cfftot1
and t1dotlessj
and allow to convert the fonts to the required format for TeX.
For other Linux and Unix systems (i.e., Mac), you’ll need to install lcdf-typetools
.
# Fedora/RedHat
sudo dnf install lcdf-typetools
# Mac
brew install lcdf-typetools
# I don't know about other Linux/Unix systems
If you have the font in PFB format
Copy the PFB files to the minion-nofont/fonts/type1/adobe/MinionPro/
.
Run the script for Linux (and also Mac or Unix)
Run the script install.sh
and select the available options:
- Install Lucida
- Install Minion Pro
- Install Both
cd lucida-minion-tex
bash install.sh
Steps for Windows
- Create the
C:\texfonts
folder. - Unzip the
lucida-type1.zip
andlucimacros.zip
files intoC:\texfonts
. - Copy
minion-nofont
contents to folder toC:\texfonts
, unzip all the zip files and then delete the zip files. - Go to the Miktex configuration (Start > Programs > MiKTeX > Maintenance).
- Add the folder created in the first step (see image 1).
- Update the FNDB and formats (see image 2) don’t forget to click “apply” and then “ok”.
- Restart the computer.
To convert the font from OTF to TeX format you need to run something of the form:
@echo off
echo "Creating PostScript fonts ..."
for %%i in (minion/*.otf) do cfftot1 minion/otf/%%i minion-nofont/pfb/%%~ni.pfb
for %%i in (minion/*.otf) do t1dotlessj minion/pfb/%%~ni.pfb minion-nofont/pfb/%%~niLCDFJ.pfb
I don’t use Windows, so this is what my imagination says is the adaption from the Linux script.