TypeFacet Autokern Installation
Step 1: Download TypeFacet
Once downloaded, expand the archive.
Step 2: Python
Autokern requires
Python 2.6 or later.
Python comes pre-installed on Mac OS X. It is easily installed on Windows.
The next steps depend on what version of Python you have.
Step 3: Python Packages
Autokern always requires the following Python packages:
- robofab package. robofab also has dependencies of its own.
- PyYAML package.
- pystache package. Only necessary if using --log-path option to write html logs.
- svgwrite package. Only necessary if using --log-path option to write html logs.
I've pre-bundled these Python packages with TypeFacet in the "dependencies" subfolder, so you don't need to download them.
It is not necessary to install the Python packages in your Python installation.
All of these Python packages are free and open source.
Step 3a: Python Packages (version 2.6 only)
For Python before version 2.7, (ie. version 2.6), you will also need:
- argparse package. I have included argparse in the dependencies folder.
-
svgwrite also needs to be patched to work on Python 2.6. I've patched the version of svgwrite in the dependencies folder.
Step 4: Test Installation
- Go to your Typefacet folder in Console (Mac) or Command Prompt (Windows)
# Examples assume you expanded the TypeFacet archive
# in your Downloads folder.
# Mac
cd ~/Downloads/typefacet
# Windows
cd Downloads\typefacet
- Invoke Autokern With Usage Switch
# Temporarily append the Python dependencies to the Python path.
# Mac:
env PYTHONPATH=dependencies/RoboFab/lib:dependencies/pystache:dependencies/svgwrite:dependencies/PyYaml/lib:dependencies/FontTools/Lib:python/src-main python python/src-main/autokern/Autokern.py -h
# Windows:
set PYTHONPATH=%PYTHONPATH%;dependencies/RoboFab/lib;dependencies/pystache;dependencies/svgwrite;dependencies/PyYaml/lib;dependencies/FontTools/Lib
python python/src-main/autokern/Autokern.py -h
Using the -h help switch (as above) should output the usage message,
which should look something like this:
usage: Autokern.py [-h]
--ufo-src-path UFO_SRC
--ufo-dst-path UFO_DST
[--log-path LOG_DST]
[--glyph-pairs-to-kern GLYPH_PAIRS_TO_KERN [GLYPH_PAIRS_TO_KERN ...]]
[--glyphs-to-kern GLYPHS_TO_KERN [GLYPHS_TO_KERN ...]]
[--min-distance-ems MIN_DISTANCE_EMS]
[--max-distance-ems MAX_DISTANCE_EMS]
[--do-not-modify-side-bearings]
[--allow-negative-side-bearings]
[--precision PRECISION]
[--intrusion-tolerance INTRUSION_TOLERANCE]
[--kerning-threshold-ems KERNING_THRESHOLD_EMS]
etc.
Congratulations, installation is complete.