One of the great new features in Code Editor 2.0 is the ability to import a custom font for use in the editor or terminal.
In short: you’ll need to grab the font file from a remote server in Code Editor. Here’s how.
One of the easiest ways to transfer a file from your Mac to Code Editor is to enable the SFTP server on your Mac, then add your Mac as a remote server in Code Editor. It will allow you secure access to all of your files, so you can grab not only the font file, but any local website files you may have stored on your Mac.
- Take the font file (*.ttf) in question and save it to an easy-to-reach place, like your Desktop.
- Enable your Mac’s SSH/SFTP server by turning on Remote Login in the Sharing pane of System Preferences. Take note of your computer’s name – you’ll need that in a second.
- In Code Editor, add a new SFTP server. Use YourComputerName.local as the server address and your user credentials as your login.
- Tap the Save button, then tap on your newly saved server.
- Tap Remote. You should now be looking at your Mac’s home directory.
- Navigate to the directory where you’ve saved your font.
- Drag your font file to the purple “Download to Local Documents” target.
- From here, go back to your sites list.
- Tap the gear icon to open Code Editor’s settings.
- Tap Fonts
- Tap the + button and select your newly imported font.
You can now select this font in your theme settings when editing a file, or in your Terminal theme settings.