Category filter
Script to Install Font in macOS devices
Within an organization, you might require special fonts to be distributed for specific users. You might be using these in the documents for customers or while creating presentations. Regardless of the circumstance, getting these fonts installed manually is quite time-consuming, considering the process involves visiting different sites that host the fonts, downloading them, and double-clicking on the downloaded files on each device to install the font. You can simplify this process using Hexnode’s
Execute Custom Script action.
You can use the below script to install fonts to Font Book in devices by running a simple command.
Scripting Language – Bash
File extension – .sh
Install fonts to Font Book
Use the below command to make the font available to the logged in user. You can copy either of the font types, True Type Fonts (TTF) or Open Type Fonts (OTF), using this command.
1 2 |
#!/bin/bash cp –R /users/username/Foldername/fontname.ttf ~/Library/Fonts/ |
For example, a logged in user ‘User1’ with the font ‘helvetica.ttf’ in the Downloads folder, can use the following command to install it in Font Book.
Ex: cp –R /users/user1/Downloads/helvetica.ttf ~/Library/Fonts/
Alternatively, to make the font available for all existing and newly created users on the system, the font needs to be copied to the system’s font folder.
1 2 |
#!/bin/bash cp –R /users/username/Foldername/fontname.ttf /Library/Fonts/ |