Skip to content

cnyegun/Hack-Medium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hack-medium

A Medium (500) weight for the Hack typeface, which ships only Regular (400) and Bold (700).

Useful in terminals, where Regular can read thin and Bold is too big a jump. It has been open upstream since 2017 and no fork distributes one, so this builds it from the Hack you already have installed.

Download

Grab the fonts from dist/ — no toolchain needed:

Hack-Medium.ttf Hack-MediumItalic.ttf
HackMedium-Bold.ttf HackMedium-BoldItalic.ttf

Install all four (the Bold ones matter — see below), then pick Hack Medium in your terminal or editor.

mkdir -p ~/.fonts/Hack-Medium
cp dist/*.ttf ~/.fonts/Hack-Medium/
fc-cache -f

On Windows: select all four, right-click → Install. On macOS: open them in Font Book.

Build it yourself

sudo dnf install fontforge python3-fonttools ttfautohint    # Fedora
make
make install

Debian/Ubuntu: sudo apt install fontforge python3-fontforge python3-fonttools ttfautohint. You also need Hack itself (source-foundry-hack-fonts / fonts-hack); if it lives somewhere unusual, pass SOURCE_DIR=/path/to/hack.

make dist refreshes the downloadable copies in dist/.

What you get

Four fonts in a family named Hack Medium:

Style Source
Medium, Medium Italic synthesised from Hack Regular / Italic
Bold, Bold Italic upstream Hack Bold, unmodified

Bold is included because a family without one makes apps fake it, which looks blurry. It is byte-identical to upstream — only the name records differ.

Installing this does not affect the Hack already on your system: Hack:bold still resolves to your system's own Hack-Bold.ttf.

Rendering

If it looks softer than the rest of your desktop, check whether subpixel antialiasing is actually reaching your terminal:

fc-match -v "Hack Medium" | grep rgba

No output means it is off — GNOME's antialiasing setting only applies to GTK apps, and terminals read fontconfig directly. To fix:

make install-fontconfig

Read the file first; it assumes an RGB-stripe panel and says what to change if that is not you.

Other commands

make WEIGHT=600      # SemiBold instead
make specimen        # preview PNGs
make verify          # re-run the QA checks
make uninstall       # remove fonts and fontconfig file

python3 scripts/build_medium.py --help covers the rest: --delta to tune the weight by hand, --hint, --source-dir.

Notes

This is a synthesised weight, not a drawn one — the Regular outlines are thickened to a stem width interpolated between the masters (203 → 234 units), then hinted with ttfautohint using upstream's own parameters. Good for screen and terminal use; not a replacement for a hand-drawn master.

make verify gates every build: naming, monospacing, glyph coverage, stems landing between Regular and Bold, no glyph gaining more ink than thickening can explain, and SHA-256 identity of the Bold companions against upstream.

The commit history explains the parts that are not obvious.

Licence

Scripts are MIT. The fonts are derivative works of Hack and inherit its licence, which permits redistribution. See LICENSE.

About

Hack font, medium weight

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors