Work-Sans/sources/BUILD.txt

52 lines
2.9 KiB
Plaintext
Raw Normal View History

Introduction
------------
I use Glyphs App 2 to work on Work Sans. As stated in README.md I am not offering UFOs since the UFOs generated from Glyphs 2 will not interpolate properly due to using Glyphs 2 only features. If there is demand, in the future I may upload a compatible UFO set for interpolation.
Generating Fonts
----------------
* * *
The fonts must be generated from Glyphs 2, not Glyphs 1 as it is using features available only in Glyphs 2 to correct interpolation bumps.
* * *
There are two sets of instances in the .glyphs file. The first set (9 weights from Thin 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]. When exporting fonts, export at the 'OTF' tab and check 'Remove Overlap' (hinting and format settings are already set in the Instances panel for each instance).
The OTFs generated with Glyphs App will be usable immediately in desktop applications.
The TTFs will need to be processed and then hinted with ttfautohint.
[1] http://www.glyphsapp.com/tutorials/vertical-metrics
2016-04-11 17:55:30 +03:00
[2] https://github.com/googlefonts/gf-docs/blob/master/HowToGenerateWebNativeFonts.md
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. Run a script which will call fontTools in Python to set the ROUND_XY_TO_GRID [3] bit by changing the flags on components from "0x0" to "0x4". It will then remove any NAME table IDs with a PlatformID="1" attribute [4].
2. Run 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).
2015-03-11 23:17:20 +03:00
[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.
[4] These IDs are needed for Mac OS 9 and are considered wasted space.
2015-03-11 23:17:20 +03:00
Converting to woff and woff2
----------------------------
2015-03-20 14:01:49 +03:00
sfnt2woff and woff2_compress are used to generate woff and woff2 fonts. Follow the resepective programs' instructions to do so.