A typeface designed for source code
Go to file
2017-10-28 21:58:56 -04:00
build Version 3.001; 379b3ad6d-dev build files - testing for numeral 1 (U+0031) design changes (issue #43) 2017-10-28 21:58:56 -04:00
docs fixed incorrect dependency links 2017-10-23 06:57:09 -04:00
img added link to Font Playground on readme 2015-10-06 20:26:40 -04:00
postbuild_processing updated archive prep script 2017-10-19 21:03:45 -04:00
source u+0031 - numeral one glyph: adjusted top stroke angle + top stroke length to improve legibility vs. lower case l = U+006c (issue #43 + others ) 2017-10-28 21:35:10 -04:00
tools/scripts/install updated ttfautohint build dependencies: Harfbuzz to 1.5.1, FreeType to 2.8.1, removed FreeType patches that are no longer necessary 2017-10-23 20:58:13 -04:00
.gitignore added gitignore file 2015-09-26 16:50:56 -04:00
.travis.yml add group: deprecated-2017Q3 to revert to old testing platform on Travis CI 2017-09-10 21:41:51 -04:00
build-subsets.sh modifies build scripts to change file paths for web font binaries (#334) 2017-10-02 23:23:30 -04:00
build-ttf.sh clarified alternate build dependency install approaches in stderr to user upon dependency install fails 2017-09-20 23:06:52 -04:00
build-woff2.sh modifies build scripts to change file paths for web font binaries (#334) 2017-10-02 23:23:30 -04:00
build-woff.sh modifies build scripts to change file paths for web font binaries (#334) 2017-10-02 23:23:30 -04:00
CHANGELOG.md updated changelog 2017-10-24 20:12:06 -04:00
CONTRIBUTING.md updated contributing docs 2017-10-19 20:47:14 -04:00
FAQ.md added design change licensing question/answer to the FAQ 2017-10-16 13:20:17 -04:00
LICENSE.md modified Hack license to MIT license (#271) 2017-09-24 20:34:51 -04:00
Makefile adds new zip, tar.gz, and tar.xz release archive build script with build target in directory external to repository, shellcheck testing, new makefile archives target (#325) 2017-09-27 21:50:35 -04:00
package.json 3.0.0 2017-10-19 21:17:23 -04:00
README.md updated readme 2017-10-22 20:57:36 -04:00

Hack

Build Status Contributors

Hack v3 is here! Click here to learn what's new.

A typeface designed for source code

Hack is designed to be a workhorse typeface for source code. It has deep roots in the free, open source typeface community and expands upon the contributions of the Bitstream Vera & DejaVu projects. The large x-height + wide aperture + low contrast design make it legible at commonly used source code text sizes with a sweet spot that runs in the 8px - 14px range. The full set of changes to the upstream source are available in the changelog.

The project is in active development and we welcome your input and contributions. You may view our design objectives and contributing instructions in CONTRIBUTING.md.

Frequently asked questions are answered in our FAQ.

Contents

Specimen

Hack — a typeface designed for source code

Overview of features

  • Typeface Name: Hack
  • Category: Monospaced
  • Character set support: ASCII, Latin-1, Latin Extended A, Greek, Cyrillic
  • Powerline Support: Yes, included by default
  • Included Styles: Regular, Bold, Italic, Bold Italic

Quick installation

NOTE ON FONT UPDATES If you are updating your version of Hack, be sure to remove the previously installed version and clear your font cache first to avoid conflicts that can lead to platform-specific rendering errors. Many platforms/distros offer package managers that automate this process. We release a Windows installer to automate the install/update process on the Windows platform. See below for additional details.

Linux

  1. Download the latest version of Hack.
  2. Extract the files from the archive (.zip).
  3. Copy the font files to either your system font folder (often /usr/share/fonts/) or user font folder (often ~/.local/share/fonts/).
  4. Clear and regenerate your font cache and indexes with the following set of commands:
$ fc-cache
$ mkfontscale <install_path>
$ mkfontdir <install_path>

Mac OS X

  1. Download the latest version of Hack.
  2. Extract the files from the archive (.zip) and click to open them.
  3. Follow the instructions from your operating system.
  4. Enjoy!

Windows

To simplify the installation process on Windows systems, we've created the Hack Windows Installer which will guide you through the installation process. This installer addresses a number of common rendering issues that occur with font installs/updates on the Windows platform and is the recommended approach for Windows users.

Chrome/ChromeOS

To use with Secure Shell, edit the following fields in Options:

  • font-family: "Hack"
  • user-css: https://cdn.jsdelivr.net/npm/hack-font/build/web/hack.css

Package managers

We highly recommend the convenience of a community developed package manager or other auto-updating utility if this is available on your platform. While the package manager releases may be a bit delayed relative to the repository releases, the packages distributed through these package managers were designed to tune and automate font installs and updates on your system.

We are aware of Hack support in the following package managers (with associated package names):

  • Arch Linux: ttf-hack
  • Chocolatey (Windows): hackfont
  • Debian: fonts-hack-ttf
  • Fedora / CentOS: dnf-plugins-core :: heliocastro/hack-fonts :: hack-fonts
  • Gentoo Linux: media-fonts/hack
  • Homebrew Cask (OS X): caskroom/fonts/font-hack
  • OpenSUSE: hack-fonts
  • Ubuntu: fonts-hack-ttf
  • Visual Studio Package Manager: hack.font

For installation issues with Hack packages, please contact the package maintainer directly.

Web font usage

Hack is available in the woff and woff2 web font formats. Use the snippets below to quickly include Hack via a CDN. Bold and italic styles are included by default and work out-of-the-box via the <strong> and <em> tags.

1. Add Hack to HTML

Include one of the following in the <head> section of your HTML file:

Subset web fonts

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/hack-font/build/web/hack-subset.css">

Full character set web fonts

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/hack-font/build/web/hack.css">

2. Add Hack to CSS

pre, code { font-family: Hack, monospace; }

See the WEBFONT_USAGE.md documentation for additional details, including instructions on how to download, host, and serve the web fonts on your own web server.

Additional tools for Hack font customization

Customize your build with alternate glyph styles

The alt-hack library includes a (growing) collection of alternate glyph styles that can be used to customize your Hack fonts. Don't like the default zero style? Swap out the UFO design source with a slashed zero or dotted zero and build new fonts that work better for you.

Contributions of new glyph styles are welcomed in the alt-hack repository. Design something new that works well with rest of the typeface and submit a pull request to the alt-hack repository so that others can use it in their own custom builds.

Detailed build instructions are available on the alt-hack repository README.md.

Line spacing adjustments

font-line is a tool that lets you easily modify the default line spacing that is used in the Hack design (20% UPM).

The following gist installs font-line and modifies line spacing for all ttf and otf fonts in the working directory where the script is located for the percent UPM value that you define at the top of the script:

Resources

Contributing

Contributions to the Hack project are welcomed. Please review our CONTRIBUTING.md document for details.

Built With

Hack is built with the following free, open source tools:

  • Font Bakery - post-compilation modifications
  • fontmake - UFO to ttf compilation
  • font-v - font versioning, git commit sha1 short string labeling of font versions
  • sfnt2woff_zopfli - ttf to woff web font compilation
  • ttfautohint - ttf instruction sets
  • ufodiff - UFO source diffs
  • ufoLib - UFO source file reads/writes/testing
  • ufolint - UFO source file linting for CI testing
  • woff2 - ttf to woff2 web font compilation

Acknowledgments

We would like to acknowledge and thank the jsDelivr team for their excellent web font CDN service and outstanding Hack project support.

License

Hack work is © 2017 Source Foundry Authors. MIT License

Bitstream Vera Sans Mono © 2003 Bitstream, Inc. (with Reserved Font Names Bitstream and Vera). Bitstream Vera License.

The font binaries are released under a license that permits unlimited print, desktop, web, and software embedding use for commercial and non-commercial applications.

See LICENSE.md for the full texts of the licenses.