,

A Guide to OpenType Fonts

Aisha Patel Avatar

·

Building and Customizing Source Sans Pro: A Guide to OpenType Fonts

Are you looking for a versatile and visually appealing font for your user interface? Look no further than Source Sans Pro. Developed by Adobe, Source Sans Pro is a set of OpenType fonts specifically designed to excel in user interface (UI) environments. In this article, we will explore how you can get involved, build the fonts from source, and even customize them to meet your unique design needs.

Getting Involved

Before diving into the technical aspects, it’s important to note that Source Sans Pro is an open-source project. If you have any suggestions or encounter issues, the designer of Source Sans Pro, Paul D. Hunt, welcomes your feedback. You can open an issue on the GitHub repository or send your suggestions directly to Paul via email.

Building the Fonts from Source

To build the binary font files from source, you will need to have the Adobe Font Development Kit for OpenType (AFDKO) installed. This powerful toolkit provides the necessary tools and utilities for font development. If you haven’t already installed AFDKO, make sure to download and set it up before proceeding.

Once you have AFDKO installed, building the fonts is just a few commands away. The key tool you’ll be using is makeotf, which is part of the AFDKO toolset. By executing makeotf -h, you can access valuable information and usage instructions.

To generate the OTF fonts, navigate to the appropriate directory (e.g., Upright/Instances/Regular/) and run the following command:

sh
$ makeotf -r -gs -omitMacNames

Similarly, if you want to generate TTF fonts, you can use the otf2ttf and ttfcomponentizer tools, as shown in the following commands:

sh
$ otf2ttf SourceSansPro-Regular.otf
$ ttfcomponentizer SourceSansPro-Regular.ttf

Building all non-variable fonts can be made more convenient by using the provided shell script named build.sh. Executing ./build.sh on macOS or Linux, or build.cmd on Windows, will generate all OTF and TTF fonts at once.

Building the Variable Fonts

Source Sans Pro also offers variable font styles, which can be highly useful for flexible and responsive designs. To build the variable TTFs, you need to install fontmake, a Python library specifically designed for font development:

sh
$ pip install fontmake

Once you have fontmake installed, you can use the buildVFs.sh script provided in the Source Sans Pro repository. Execute the following command to generate the four variable fonts (two CFF2-OTFs and two TTFs):

sh
$ ./buildVFs.sh

Building with make

If you prefer building directly from poles or want to avoid repetitive builds, you can use the make command. Running make will update everything, while make instances will generate only the font.ufo instances from the poles. If you want to clean up makeotf‘s defaults and other log files, you can run make clean. Furthermore, to remove all build artifacts, including the target font binaries, use make cleanall. It’s important to note that the font.ufo instances are stored in the repository and are not removed during the make clean process. If necessary, you can manually delete them from your working tree with make cleaninstances.

Conclusion

Source Sans Pro is not only a visually appealing font but also a highly customizable and versatile option for user interfaces. By following the steps outlined in this guide, you can easily build the fonts from source, including the generation of variable fonts. Whether you’re a font enthusiast, a designer looking to customize Source Sans Pro, or a developer interested in contributing to the project, the resources and tools provided by Adobe and the open-source community make it an exciting journey. Start exploring the possibilities of Source Sans Pro today, and enhance your UI with a beautifully designed and functional font.

Source: GitHub Repository

Leave a Reply

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