Skip to content

Commit 5cba368

Browse files
committed
added instructions for ttfautohint control instructions files modifications in order to complete builds with alternates
1 parent 61e2d57 commit 5cba368

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,40 @@ The glyph design source files live in the `glyphs` subdirectory within each of t
3939
#### Obtain replacement source files
4040
Download the `*.glif` files in the regular, bold, italic, and bolditalic directories from the alt-hack repository for each replacement that you want to make in the Hack source. The alternate style source files have the same file path as we use in the Hack source. The `*.glif` design source files are intended to be used as direct replacements for the existing default source files.
4141

42-
#### Overwrite Existing Source Files
42+
#### Overwrite existing source files
4343
Copy the alternate glyph source files for the appropriate font variants (i.e. regular, bold, italic, bold italic) from this repository into the corresponding `glyphs` directory of the Hack UFO source for the respective variant. This should overwrite an existing file in that directory. Please note that the alternate files for each variant have the same file path. Please confirm that you are overwriting an existing file with a new file that is of the appropriate variant type.
4444

45+
#### Eliminate existing manual instruction sets for alternate glyphs (if present)
46+
Some of the glyphs in the Hack sets include manual changes to the ttfautohint automated instruction sets ("hints"). These must be eliminated if you replace an existing glyph in the main Hack sets with a stylistic alternate from this repository or your build will fail (or create undesirable rendering changes that are not tuned for the alternate glyph.
47+
48+
The control instructions files that are used to manually modify the hints in the Hack builds are located in the [tt-hinting directory](https://github.com/source-foundry/Hack/tree/master/postbuild_processing/tt-hinting) of the Hack repository. There is one text file per Hack variant (i.e. for Regular, Italic, Bold, and BoldItalic sets). The manual hints are organized by Unicode code point.
49+
50+
Examine these control instructions files before you build your new fonts. If you identify a block of instructions under a heading for a Unicode code point that you intend to replace, either delete all lines associated with that glyph or comment out the block with `#` symbols at the beginning of each line.
51+
52+
For example, to build a set of fonts with new zero alternate glyphs (Unicode U+0030), you would need to modify an existing control instructions file that includes the following lines:
53+
54+
55+
##### Hack-Regular-TA.txt
56+
57+
```
58+
# U+0030 zero glyph ID 548
59+
uni0030 touch 35,36,45,46,47,56 y -0.5 @8
60+
uni0030 touch 35,36,56 y -1.0 @12,13,14
61+
```
62+
63+
to the following:
64+
65+
```
66+
# U+0030 zero glyph ID 548
67+
# uni0030 touch 35,36,45,46,47,56 y -0.5 @8
68+
# uni0030 touch 35,36,56 y -1.0 @12,13,14
69+
```
70+
71+
or simply delete the heading line `# U+0030 zero glyph ID 548` and the individual instruction lines below that level for the U+0030 glyph. Repeat this for any values that are included for your glyph changes in each of the four control instructions files BEFORE you attempt to build your new files.
72+
4573
#### Build new fonts
4674

47-
Use the build instructions in the Hack repository to compile new desktop `*.ttf` font files and/or web fonts with your custom version of Hack.
75+
Use the [build documentation](https://github.com/source-foundry/Hack/blob/master/docs/BUILD.md) in the Hack repository to compile new desktop `*.ttf` font files and/or web fonts with your custom version of Hack.
4876

4977
### Post-Modification Licensing
5078
These changes to the Hack typeface fall within acceptable modification practice under the Hack license.

0 commit comments

Comments
 (0)