README.md.orig 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. # Hack
  2. [![Build Status](https://travis-ci.org/source-foundry/Hack.svg?branch=master)](https://travis-ci.org/source-foundry/Hack) [![Contributors](https://img.shields.io/badge/contributors-121-orange.svg?style=flat)](https://github.com/source-foundry/Hack/blob/master/docs/CONTRIBUTORS.md)
  3. ### A typeface designed for source code
  4. 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](https://www.gnome.org/fonts/) & [DejaVu](http://dejavu-fonts.org/wiki/Main_Page) 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](CHANGELOG.md).
  5. 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](CONTRIBUTING.md).
  6. Frequently asked questions are answered in our [FAQ](FAQ.md).
  7. ### Contents
  8. * [Features](#overview-of-features)
  9. * [Quick installation](#quick-installation)
  10. * [Package manager installation](#package-managers)
  11. * [Web font usage](#web-font-usage)
  12. * [Additional tools for font customization](#additional-tools-for-hack-font-customization)
  13. * [Resources](#resources)
  14. * [Contributing](#contributing)
  15. * [Build tools](#built-with)
  16. * [Acknowledgments](#acknowledgments)
  17. * [License](#license)
  18. ### Specimen
  19. <a href="http://source-foundry.github.io/Hack/font-specimen.html"><img src="img/hack-specimen-2.png" alt="Hack &mdash; a typeface designed for source code" width="728"></a>
  20. ## Overview of features
  21. - **Typeface Name**: Hack
  22. - **Category**: Monospaced
  23. - **Character set support**: ASCII, Latin-1, Latin Extended A, Greek, Cyrillic
  24. - **Powerline Support**: Yes, included by default
  25. - **Included Styles**: Regular, Bold, Italic, Bold Italic
  26. ## Quick installation
  27. **NOTE ON FONT UPDATES**
  28. *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.*
  29. ### Linux
  30. 1. Download the [latest version of Hack](ttf_latest)
  31. 2. Extract the files from the archive (`.zip`)
  32. 3. Copy the font files to either your system font folder (often `/usr/share/fonts/`) or user font folder (often `~/.local/share/fonts/`)
  33. 4. Clear and regenerate your font cache and indexes with the following set of commands:
  34. ```
  35. $ fc-cache
  36. $ mkfontscale <install_path>
  37. $ mkfontdir <install_path>
  38. ```
  39. ### Mac OS X
  40. 1. Download the [latest version of Hack][ttf_latest].
  41. 2. Extract the files from the archive (`.zip`) and click to open them.
  42. 3. Follow the instructions from your operating system.
  43. 4. Enjoy!
  44. ### Windows
  45. To simplify the installation process on Windows systems, we've created the [Hack Windows Installer](https://github.com/source-foundry/Hack-windows-installer/releases/latest) 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.
  46. ### Chrome/ChromeOS
  47. To use with [Secure Shell](https://chrome.google.com/webstore/detail/secure-shell/pnhechapfaindjhompbnflcldabbghjo),
  48. edit the following fields in Options:
  49. - font-family: `"Hack"`
  50. - user-css: `https://cdn.jsdelivr.net/font-hack/2.020/css/hack-extended.min.css`
  51. ## Package managers
  52. 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.
  53. We are aware of Hack support in the following package managers (with associated package names):
  54. - **Arch Linux**: `ttf-hack`
  55. - **Chocolatey (Windows)**: `hackfont`
  56. - **Debian**: `fonts-hack-ttf`
  57. - **Fedora / CentOS**: `dnf-plugins-core :: heliocastro/hack-fonts :: hack-fonts`
  58. - **Gentoo Linux**: `media-fonts/hack`
  59. - **Homebrew Cask (OS X)**: `caskroom/fonts/font-hack`
  60. - **OpenSUSE**: `hack-fonts`
  61. - **Ubuntu**: `fonts-hack-ttf`
  62. - **Visual Studio Package Manager**: `hack.font`
  63. For installation issues with Hack packages, please contact the package maintainer directly.
  64. ## Web font usage
  65. 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.
  66. #### 1. Add Hack to HTML
  67. Include one of the following in the &lt;head&gt; section of your HTML file:
  68. **Subset web fonts**
  69. ```html
  70. <link rel="stylesheet" href="//cdn.jsdelivr.net/font-hack/2.020/css/hack.min.css">
  71. ```
  72. **Full character set web fonts**
  73. ```html
  74. <link rel="stylesheet" href="//cdn.jsdelivr.net/font-hack/2.020/css/hack-extended.min.css">
  75. ```
  76. #### 2. Add Hack to CSS
  77. ```css
  78. pre, code { font-family: Hack, monospace; }
  79. ```
  80. See the [WEBFONT_USAGE.md](docs/WEBFONT_USAGE.md) documentation for additional details, including instructions on how to download, host, and serve the web fonts on your own web server.
  81. ## Additional tools for Hack font customization
  82. ### Customize your build with alternate glyph styles
  83. The [alt-hack](https://github.com/source-foundry/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.
  84. 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.
  85. Detailed build instructions are available on the [alt-hack repository README.md](https://github.com/source-foundry/alt-hack).
  86. ### Line spacing adjustments
  87. [font-line](https://github.com/source-foundry/font-line) is a tool that lets you easily modify the default line spacing that is used in the Hack design (20% UPM).
  88. 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:
  89. - [linespace.sh](https://gist.github.com/chrissimpkins/f39e85f5f157d839e46168de1b61a174) ([download .zip](https://gist.github.com/chrissimpkins/f39e85f5f157d839e46168de1b61a174/archive/f3f93dea87d64ddc4684a61cbc96ddf79d30824a.zip))
  90. ## Resources
  91. <<<<<<< HEAD
  92. * [About Hack](docs/ABOUT.md)
  93. =======
  94. >>>>>>> dev
  95. * [Full specimen](http://source-foundry.github.io/Hack/font-specimen.html)
  96. * [Changelog](CHANGELOG.md)
  97. * [Project website](http://sourcefoundry.org/hack/)
  98. * [Contributors](docs/CONTRIBUTORS.md)
  99. ## Contributing
  100. Contributions to the Hack project are welcomed. Please review our [CONTRIBUTING.md](CONTRIBUTING.md) document for details.
  101. ## Built With
  102. Hack is built with the following free, open source tools:
  103. - [Font Bakery](https://github.com/googlefonts/fontbakery) - post-compilation modifications
  104. - [fontmake](https://github.com/googlei18n/fontmake) - UFO to ttf compilation
  105. - [font-v](https://github.com/source-foundry/font-v) - font versioning, git commit sha1 short string labeling of font versions
  106. - [sfnt2woff_zopfli](https://github.com/bramstein/sfnt2woff-zopfli) - ttf to woff web font compilation
  107. - [ttfautohint](https://www.freetype.org/ttfautohint/) - ttf instruction sets
  108. - [ufodiff](https://github.com/source-foundry/ufodiff) - UFO source diffs
  109. - [ufoLib](https://github.com/unified-font-object/ufoLib) - UFO source file reads/writes/testing
  110. - [ufolint](https://github.com/source-foundry/ufolint) - UFO source file linting for CI testing
  111. - [woff2](https://github.com/google/woff2) - ttf to woff2 web font compilation
  112. ## Acknowledgments
  113. We would like to acknowledge and thank the [jsDelivr](https://www.jsdelivr.com/) team for their excellent web font CDN service and outstanding Hack project support.
  114. ## License
  115. **Hack** work is &copy; 2017 Source Foundry Authors. MIT License
  116. **Bitstream Vera Sans Mono** &copy; 2003 Bitstream, Inc. (with Reserved Font Names _Bitstream_ and _Vera_). Bitstream Vera License.
  117. The font binaries are released under a license that permits unlimited print, desktop, web, and software embedding use for commercial and non-commercial applications.
  118. See [LICENSE.md](https://github.com/source-foundry/Hack/blob/master/LICENSE.md) for the full texts of the licenses.
  119. <!-- Link to the latest release archive for README.md file -->
  120. [ttf_latest]: https://github.com/chrissimpkins/Hack/releases/download/v2.020/Hack-v2_020-ttf.zip