On Thu, 15 Jul 2021 19:16:50 -0400, Douglas McIlroy <douglas.mcil...@dartmouth.edu> wrote: > I'm generally an intrepid groff user, but not when it comes to font > installation. Anything that demystifies the process will win my applause. > > Doug
Despite the vagaries of directory locations, once you understand what install-font.sh wants and fontforge is installed install-font.sh is relatively easy to use. I typically write a short script that calls install-font.sh with the option to specify the correct directory for each of the variations of the font in which I'm interested. Here's the script I use to install Cormorant Garamond. ===== install-cormorant-garamond.sh ======================== #! /usr/bin/env bash if [ "$1" != "" ]; then [ -d "$1" ] || { echo Bogus DEST: $1; exit 1; } DEST="$1" else DEST="/Users/tkb/sw/versions/groff/git/share/groff" fi ~/current/groff/utilities/install-font.sh -n -P "$DEST" -d -F CormorantGaramond -f +R CormorantGaramond-Regular.ttf ~/current/groff/utilities/install-font.sh -n -P "$DEST" -d -F CormorantGaramond -f +I CormorantGaramond-Italic.ttf ~/current/groff/utilities/install-font.sh -n -P "$DEST" -d -F CormorantGaramond -f +B CormorantGaramond-Bold.ttf ~/current/groff/utilities/install-font.sh -n -P "$DEST" -d -F CormorantGaramond -f +BI CormorantGaramond-BoldItalic.ttf ============================================================ You can see that I default to installing it to the directory /Users/tkb/sw/versions/groff/git/share/groff, but there is an option to change it since I've got multiple versions installed. The directory /Users/tkb/sw/versions/groff/git is where I've configured the groff I build from git to install. (I used to use /sw/versions/groff/git, which I like better, but upgrading to macOS Catalina saw all the files you owned outside your home directory "quarantined" and made difficult to access, and I opted not to fight it.) If your font has other variants - other weights like Light, Medium, and Semi, or smallcaps, etc., you can just add invocations of install-font.sh to install them with names like CormorantGaramondLight, etc. I'm actually going to be using multiple weights of Cormorant Garamond, so I'll be adding those to this script soon. Anyway, I have one of these scripts for each font I install, so I can rerun them; sometimes fontforge reports problems, or I make a mistake specifying the font file names. And I actually use three different computers regularly, so I install them on each one. So having the script makes rerunning in case of errors nad keeping the font names consistent on different machines easy. They need to be run from the directory with the font files. Staring to use install-font.sh greatly widened the breath of fonts that I can use with groff, having significantly lowered the difficulty of installing fonts for me. -- T. Kurt Bond, tkurtb...@gmail.com, tkurtbond.github.io and tkb.tx0.org