Tech

How to Create Your Own Fonts With Glyphtracer on Linux


Typography is an art that helps a writer express their individuality, as well as makes windows, terminals, and even text files look beautiful. Font designers typically have years of training and an arts background before the fruits of their labor make it onto your screen.


With Glyphtracer, it’s easy to create your own font on Linux, and see how well your skills stand up against those of professionals.


What Is Glyphtracer, and How Does It Help You Create Your Own Fonts?

Glyphtracer is a Python application that accepts a one-bit image containing pictures of letters and helps you to tag each letter to a Unicode code point. It then converts the images to vector form and writes them to an SFD file.

Glyphtracer was designed with Linux in mind, although the developer, jpakanne states that, “It might work on OSX or Windows. It might not.”

Install Glyphtracer on Linux

Before you can install Glyphtracer, you need to install pip3 and pyqt5:

sudo apt install python-pip3
pip3 install pyqt5

Install Potrace—a tool for converting bitmaps into vectorized images:

sudo apt install potrace

Now clone the Glyphtracer GitHub repository:

git clone https:

Move into the new directory using the cd command and install Glyphtracer by typing:

cd glyphtracer
sudo python3 setup.py install

You can now start Glyphtracer from any terminal with:

glyphtracer.py

Getting Started With Glyphtracer

The first thing to do is to write out your alphabet. To start with, print out lowercase only, and if possible, use black on a white background. Make sure to leave sufficient whitespace between the characters. You will achieve the best results by scanning in some hand-drawn calligraphy or by using a graphics tablet. At a push, you can draw with a mouse.

Before using Glyphtracer, you need to use ImageMagick to convert the image to a one-bit PNG:

convert -monochrome your_alphabet_image.jpg new_image.png

Open Glyphtracer, and in the dialog window, give your new font a name. Choose the input file, and the file you want to output.

alphabet characters - each with a box around it

The next window will show you your alphabet. Glyphtracer will be able to recognize that there are characters on screen, but can’t tell what they are. Select your character set from the menu at the bottom left of the screen. In our case, this is “latin lower case“, then click on each letter in turn.

If you forget where you’re up to, glance at the letter counter in the center of the bottom bar.

When you’ve finished, click “Generate SFD file“.

Finalize Your New Font in FontForge

Your new font is a Spline Font Database (SFD) file, and before you can use it in your favorite text editor, you need to convert it to a TrueType (TTF) font. While there are any number of online converters which can do this for you, it’s better if you use local tools—in this case, FontForge.

First, install FontForge:

sudo apt install fontforge
fontforge

Open the FontForge app, then select your SFD file. FontForge will present the characters you’ve drawn. Double check you have the characters you need, then choose Generate Font from the file menu.

In the dialog, select TrueType, then hit Generate. Your new font will be saved under the filename you specified.

Use Your New Font in Your System

a lower case alphabet in various sizes

Installing your new font on Linux couldn’t be simpler: just open your file manager and double-click on the icon for your new font. You will see a preview of your alphabet in a range of sizes, and if everything looks good, click Install.

You can now use your font in any application.

Take a Course to Improve Your Design Skills!

Designing custom fonts is fun and a great way to customize your Linux system, but it’s just one element of user experience design.

If you enjoy crafting systems to be more intuitive and user-friendly, consider taking a course in other elements of UX design—you may even be able to make a career out of it!

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button