Configs2026年7月6日·1 分钟阅读

Hack — A Typeface Designed for Source Code

A monospaced typeface optimized for code readability with clear character differentiation, extensive Unicode coverage, and Powerline glyph support, available in Regular, Bold, Italic, and Bold Italic.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Hack Typeface
直接安装命令
npx -y tokrepo@latest install 6ac5adbf-7937-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Hack is an open-source monospaced typeface built specifically for writing and reading code. It descends from the Bitstream Vera and DejaVu font families, with extensive modifications to improve character distinction, readability at small sizes, and overall consistency in terminal and editor environments.

What Hack Does

  • Provides a monospaced font with clear differentiation between similar characters (0/O, 1/l/I)
  • Ships in four styles: Regular, Bold, Italic, and Bold Italic
  • Covers 1,573 glyphs including Latin, Greek, Cyrillic, and technical symbols
  • Includes Powerline glyphs for terminal prompt theme compatibility
  • Renders cleanly across macOS, Windows, and Linux font stacks

Architecture Overview

Hack is built from UFO source files maintained in the repository. The build pipeline uses fontmake to compile TTF and WOFF2 binaries, with additional post-processing scripts that apply hinting (ttfautohint), fix metrics, and patch Powerline symbols. Release artifacts include platform-specific installers and web font packages.

Self-Hosting & Configuration

  • Install via package managers (Homebrew, apt, choco, pacman) or download the release archive
  • For web use, include the WOFF2 files and accompanying CSS from the web font release
  • Configure your editor or terminal to use "Hack" as the font family
  • Recommended sizes are 10-14px for most displays; the font is optimized for these ranges
  • Use the Nerd Font patched variant (Hack Nerd Font) for additional icon glyphs

Key Features

  • Distinct zero with a forward slash and lowercase L with a tail for disambiguation
  • Balanced stroke widths tuned for both retina and standard-DPI screens
  • Embedded bitmap hints for crisp rendering on Windows ClearType
  • MIT license permits use in any project including commercial applications
  • Active maintenance with community contributions for glyph coverage expansion

Comparison with Similar Tools

  • Fira Code — includes programming ligatures (!=, =>); Hack deliberately omits ligatures
  • JetBrains Mono — taller x-height with optional ligatures; designed for JetBrains IDEs
  • Source Code Pro — Adobe's monospace family; wider letterforms, more weights available
  • Cascadia Code — Microsoft's terminal font with ligature and Nerd Font variants
  • Iosevka — extremely customizable; build from source with your preferred spacing and style

FAQ

Q: Does Hack support programming ligatures? A: No. Hack prioritizes individual character clarity over ligatures. If you want ligatures, consider Fira Code or JetBrains Mono.

Q: How do I get Powerline glyphs? A: The standard Hack font includes basic Powerline symbols. For extended icon sets, use the Hack Nerd Font variant from the Nerd Fonts project.

Q: What is the recommended font size? A: Hack is optimized for 10-14px on standard displays and 12-16px on high-DPI screens. The hinting is tuned for these ranges.

Q: Can I modify and redistribute Hack? A: Yes. Hack is released under a modified MIT license that permits modification and redistribution, including for commercial use.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产