Hack Typeface v3

Chris Simpkins
Source Words
Published in
8 min readOct 23, 2017

--

The latest major version of the Hack typeface has landed. v3 is a more free & open face that can be customized with a new library of alternate glyph styles. We simplified the development workflow from top to bottom to support upstream contributions and downstream derivative project creation. This article outlines the changes in the new release.

About Hack

Hack is a free, open source monospaced typeface that is designed to be a general purpose face for the display of source code text.

For the tl;dr crowd, the desktop and web fonts are available for download and the quick installation documentation describes the installation steps so that you can enjoy the fonts immediately. We recommend that Windows users install the fonts with our Windows installer.

Documentation is available for web font users who would like to include Hack in their HTML via CDN.

What’s New?

Hack customization with the alt-hack library

Alternate glyph styles are now available in the alt-hack library

We are developing the alt-hack library to house alternate glyph designs that you can use to customize your Hack typeface builds. Don’t like the default zero design? Grab a slashed or dotted version of the zero glyph source, overwrite the existing source files in the Hack repository, and build a custom version of the Hack source that meets your needs.

The alt-hack repository is at a very early stage of development and we intend to broaden the alternate glyph design support across numerous Unicode code points. This alternate glyph repository is open for contributions by anyone. New designs that support platform specific rendering issues or simply address aesthetic changes to the default design are welcomed. Re-design any existing glyph in the Hack typeface with an alternate style and contribute the new *.glif source files with your modified designs to the library (with a standard Github pull request approach) so that other users can include your designs in their custom builds. Hack license changes with the v3 release permit you to use “Hack” in the name of your derivative builds or to create new names for the derivative typefaces. Create a new combination of glyphs that you like and push the changes out there so that others can enjoy them too!

New simplified development workflow

One of our primary goals with this release was to create a new, simple typeface development workflow that supports contributors who would like to participate in the development of the Hack project as well as developers who would like to create and maintain downstream derivative projects. In order to accomplish this, the v3 release includes a major overhaul of our entire build approach, from the typeface source code specification to the build tooling that is used for compilation and post-compile font modifications. We received incredibly helpful feedback from the open source community and have attempted to deliver a release that meets these objectives.

We want Hack to behave like a “standard” open source software project that leverages the capabilities of git to support upstream and downstream development. We hope that the new approach simplifies work by redistribution teams, users who would like to tinker with the design for their own local use case scenarios, designers/developers who would like to commit contributions upstream to the Hack source, and those who would like to create full fledged release-ready downstream derivatives intended for others. We heard your feedback and v3 is very much intended to provide support for you to modify Hack to meet your own needs and release it anywhere. We are ready for your issue reports in order to further optimize the approach as you attempt to redistribute Hack packages, contribute source changes back upstream, or maintain new downstream forks that are based on the Hack source code.

New source file specification

We now compile directly from Unified Font Object (UFO) v2 typeface source (an XML file typeface source specification) and you can use any editor that supports the UFO specification to modify the source code. Most current open source and commercial font editors are released with UFO source support. Heck, we’ve even started to use text editors to modify the source text directly for some issues. We want to support work that occurs in whatever editor works best for you and permit you to contribute your improvements back upstream.

New build tooling and make build approach

We transitioned to an end-to-end scripted build workflow that is executed from the command line and uses only free, open source build tools to take you from the UFO source code files to the hinted, release ready desktop and web font files. The build process is standardized and can be replicated with a cross-platform, simple make approach. Our build documentation details the new build dependencies and make targets.

Here is an overview of the most commonly used build tasks with the new make target approach:

Build desktop and web font files

$ make

Build desktop files only

$ make ttf

Build web font files only

$ make webfonts

See the full build documentation for details on how to install the build dependencies (the installation of which is also supported and automated with make).

We intentionally limited dependencies to software projects that are developed under free, open source software redistribution guidelines. These efforts will permit redistribution of the Hack typeface (and any typeface derived from Hack that uses the same build tooling approach) across a broader range of platforms, including redistribution on Linux distros such as Debian/Ubuntu and Fedora that build typefaces from source (rather than simply releasing a typeface project’s compiled files). These Linux distros apply free, open source software guidelines to the redistributed projects, the project’s build dependencies, and all of the dependencies of dependencies during the package review process. The extensive efforts by the Hack package maintainers on these platforms will lead to support of an expanded range of vetted open source typeface compilation and post-compile modification tooling for this and other typeface projects that intend to release there in the future. If you are installing Hack through one of these packages, we encourage you to reach out to your package maintainer and give them a much deserved high five.

New licensing

The Hack licensing was changed as of v3 and now includes MIT licensing for all Hack work that modifies the upstream Bitstream Vera Sans Mono and DejaVu Sans Mono source. As part of this licensing change, the reserved font name “Hack” was eliminated from the license.

Removal of the reserved font name eliminates issues that arose with derivatives such as:

  • the inability to make platform specific modifications to the source (e.g. adjustments to hinting, build tooling/processes, etc.) for redistribution packages and release the fonts as “Hack”
  • the inability to use “Hack” as part of the typeface name in a modified design derivative project (e.g. “Hack Ligature” or “Hack SlashedZero”)

While we recommend that you release design modifications that change the upstream source appearance under a name that differs from the single word “Hack” in order to avoid confusion for the end user, we no longer restrict this in the license. We understand these needs and modified the license in order to support them.

Expanded character set support

We’ve extended the character set support in all sets to include coverage of all ASCII, Latin-1, Latin Extended A glyphs in modern languages (a glyph in the Latin Extended A set that is of historic interest is coming in the next release to complete the full Latin Extended A set). A big thanks to JM for all of his design efforts on these extended character set glyphs!

ASCII hinting improvements

We reviewed the instruction set renders across all ASCII glyphs in each of the four variant font sets and manually modified the ttfautohint automated instruction sets over a size range of 8–14ppem. This range includes the most commonly used source code text sizes viewed on the screen. We recognize that our users commonly stare at very small text sizes where the pixel renders of the glyph design is less than ideal. Pixel nudges matter when you get into that range on the screen and we delivered a batch of improvements at small text sizes so that your source looks better at the sizes that you use in your editors.

Powerline glyph alignment improvements

We include support for Powerline glyphs by default; however, these glyphs have been plagued by platform dependent vertical and horizontal alignment issues that have been very problematic to troubleshoot and fix. Every attempt at an improvement on one platform led to a detrimental impact on others. Unfortunately, typefaces were not meant to be used for layout of UI…

James Lee contributed an impressive analysis of the problem and pull request with design changes to address it. If you are a Powerline user, we highly recommend that you upgrade your fonts to take advantage of these Powerline glyph updates.

New web font subsets

The Hack web fonts are released as full set and subset files. We modified the character set support in the web font subsets to ASCII, Latin-1, Latin Extended A, General Currency, and Punctuation sets. The subset files are approximately 20% of the size of the complete sets and strike an acceptable balance between size and character set support in our opinion. Please note that the web font paths have changed in this release. CSS files were updated with the new paths accordingly.

New web font CDN approach

Our web font CDN URL has changed as of v3. We now push CSS and web font files to the jsDelivr CDN via npm. You can find the updated documentation on how to support always current web font release files in your HTML on the Hack README. Please refer to the jsDelivr CDN documentation if you would prefer to freeze the web fonts at a specific release.

Changes in build file types

We eliminated the otf desktop file builds, opting to support ttf builds only. We have a greater degree of manual control over the instruction sets in the ttf files. Because of the importance of this issue at small source code text sizes on the screen, the ttf builds have always been recommended for all users on the desktop. We formalized this recommendation by eliminating your choice :)

We also eliminated all svg, eot, and web ttf web font builds. Our web font builds now include woff and woff2 files only as there is now broad support across all commonly used web browsers for these web font file types. CSS files have been updated accordingly for our web font users.

On behalf of all of the project contributors, enjoy the new version of Hack!

--

--