2015-08-11 03:47:35 +03:00
|
|
|
# Tools
|
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
This directory contains miscellaneous tools for working with the Google Fonts collection.
|
|
|
|
**Glyph set documentation is in the encoding subdirectory.**
|
2015-12-14 12:52:21 +03:00
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
## Requirements and Dependencies
|
2015-12-14 12:52:21 +03:00
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
These tools are intended to work with Python 2.7 systems.
|
|
|
|
While these tools may work with Python 3.x, if so, that's a happy accident.
|
|
|
|
Pull Requests welcome! :)
|
2015-08-11 03:47:35 +03:00
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
These tools depend on the submodule `GlyphsInfo`.
|
|
|
|
Make sure the submodule is up to date by running:
|
2017-05-27 00:20:58 +03:00
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
git submodule update --init --recursive
|
2017-05-27 00:20:58 +03:00
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
Also `compare_font.py` and `sanity_check.py` have additional dependencies that can be installed with pip:
|
2017-05-27 00:20:58 +03:00
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
sudo easy_install pip;
|
|
|
|
pip install --user google-apputils protobuf git+git://github.com/behdad/fonttools.git;
|
2015-12-08 22:07:36 +03:00
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
Upstreams:
|
2015-12-08 22:07:36 +03:00
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
* https://github.com/schriftgestalt/GlyphsInfo
|
2016-02-19 16:54:50 +03:00
|
|
|
* https://github.com/google/google-apputils
|
2015-12-08 22:07:36 +03:00
|
|
|
* https://github.com/google/protobuf
|
2016-02-19 16:54:50 +03:00
|
|
|
* https://github.com/behdad/fonttools
|
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
## Sample Usage
|
2016-02-19 16:54:50 +03:00
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
Compare fonts:
|
2016-02-19 16:54:50 +03:00
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
python compare_font.py font1.ttf font2.ttf;
|
2017-08-29 18:09:54 +03:00
|
|
|
|
2017-10-05 23:07:42 +03:00
|
|
|
Add a METADATA.pb to a family directory
|
|
|
|
|
|
|
|
python add_font.py ../ofl/newfamily;
|
|
|
|
|
|
|
|
Sanity check a family directory:
|
|
|
|
|
|
|
|
python sanity_check.py --repair_script=/tmp/fix.py ../ofl/josefinsans;
|
|
|
|
python sanity_check.py --repair_script=/tmp/fix.py --fix_type=fsSelection ../ufl;
|
2017-08-29 18:09:54 +03:00
|
|
|
|
2016-02-19 16:54:50 +03:00
|
|
|
## License
|
|
|
|
|
|
|
|
The tools and files under this directory are available under the Apache License v2.0, for details see [LICENSE.txt](LICENSE.txt)
|