45

I know how do install new fonts using Font Book.

Is there also a way to install fonts from the terminal, using some smart shell command?

0

4 Answers 4

64

You can simply copy them into /Library/Fonts (for system wide use) or ~/Library/Fonts (for use by current user).

4
  • Unfortunately, this no longer works in MacOS 14.0. Fonts need to be validated and activated before they can be used in other apps. I noticed some extra files in the fonts directories, but am a bit hesitant to edit them directly. Commented Oct 3, 2023 at 12:34
  • 1
    @JackGoossen I can’t reproduce that at all. Dropping them into ~/Library/Fonts works for me in 14.1 (currently in beta) as it always has.
    – user137369
    Commented Oct 24, 2023 at 15:44
  • @user137369 You are right, I just re-checked again on 14.0 and it seems to work. The font only shows up in Pages if I select 'Format > Fonts > Show Fonts', not in the drop down list in the format pane, maybe that got me confused. Commented Oct 25, 2023 at 8:12
  • The font when dropped to ~/Library/Fonts does not show up in fonts selection anywhere, nor in the "Font Book" app. Using macOS 13.6 (Ventura). Any steps to refresh or make them visible (preferably via Terminal, of course)?
    – LosAlamos
    Commented Oct 26, 2023 at 10:54
4

Install fonts with the following terminal command (replace BRLNSR with your font):

cd ~/Library/Fonts && { 
    curl -O 'https://github.com/FrankHassanabad/ResumeBuilder/blob/master/fonts/src/main/resources/frankhassanabad/com/github/windowsfonts/BRLNSR.TTF'
    cd -; }

This code does the following:

  1. cd into the fonts directory
  2. curl downloads the font
  3. pops back to the original directory

This relies on the very nice fonts github repo from Frank Hassanabad with a bunch of fonts stored - but you could change the curl url to wherever the font you want is located online.

The clever way the cd into a directory, download and pop out again came from user Atle's answer here.

1
  • you need to add the -L to curl for it to properly work, as there are some redirections involved and the original command doesn't work properly anymore (download 0kb file)
    – Piotr
    Commented May 14 at 9:17
1

By manually copying to a fonts folder used to be the only way to install fonts before Font Book was introduced. (barring 3rd party sw)

0

Add this to your startup file (e.g. ~/.zshrc):

alias fontbook="open -b com.apple.FontBook"

Then, in a new Terminal, you can execute:

fontbook *.otf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .