Work-Sans/sources/BUILD.txt

45 lines
2.7 KiB
Plaintext
Raw Normal View History

Introduction
------------
I use Glyphs App to work on Work Sans. As stated in README.md I am not offering UFOs since the UFOs generated from Glyphs App will not interpolate properly due to using Glyphs App only features. If there is demand, in the future I may upload a compatible UFO set for interpolation.
Generating Fonts
----------------
There are three sets of instances in Glyphs app, two that are named with font weights, the third named using its stem weights. The first set (10 weights from Hairline to Black) are for generating OTFs and follow Microsoft's recommendations for setting vertical metrics[1]. The second set are for generating TTFs for webfonts and follows Google Font's webfont recommendations[2]. The third were for testing.
The OTFs generated with Glyphs App (Remove Overlap, Autohint) will be usable immediately in desktop applications.
The TTFs (Remove Overlap) will need to be processed and hinted with ttfautohint.
[1] http://www.glyphsapp.com/tutorials/vertical-metrics
[2] https://code.google.com/p/googlefontdirectory/wiki/HowToGenerateWebNativeFonts
Generating hinted TTFs
----------------------
You will need:
- ttfautohint
http://www.freetype.org/ttfautohint/
- Fonttools/TTX
https://github.com/behdad/fonttools/
- sfnt2woff
https://people.mozilla.org/~jkew/woff/
2015-03-11 23:17:20 +03:00
- woff2_compress
https://github.com/google/woff2
2015-03-11 23:17:20 +03:00
Bram Stein has created homebrew formulas for the above tools @ https://github.com/bramstein/homebrew-webfonttools
Once the TTFs have been generated, they need to processed with the generatefamily.sh script. To run this script, make sure the exported TTFs are in the same folder as the script. Open Terminal at the folder and enter:
sh generatefamily.sh
This script will:
1. Dumps the `GLYF` table of each TTF in the folder.
2. Performs a find and replace using Python to set the ROUND_XY_TO_GRID[3] bit in composite glyphs in each generated TTX file.
3. Recompiles TTFs from the edited TTX file.
2015-03-11 23:17:20 +03:00
4. Runs ttfautohint and creates autohinted TTFs (with control-files for some weights that define custom hinting to correct autohinting mistakes when rendered in ClearType GDI which is commonly encountered in Firefox on Windows 7).
[3] Setting the ROUND_XY_TO_GRID bit in composite glyphs causes components to be shifted by an integer pixel amount which preserves the hinted shape. This reduces file size so that ttfautohint does not need to rehint composite glyphs to create consistent rendering especially important for glyphs such as super-/sub-script numerals and fractions which use components that are shifted.
2015-03-11 23:17:20 +03:00
Converting to woff and woff2
----------------------------
sfnt2woff and woff2_compress are used to generate woff and woff2 fonts. Follow the resepective programs' instructions to do so.