diff --git a/CHANGELOG.md b/CHANGELOG.md index ca8bafc..0b8200c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,15 @@ ## Changelog +### v1.0.0 + +- refactor fontname.py script to support Python 3.6+ interpreter only +- drop support for all versions of the Python 2 interpreter +- black source formatting +- add support for [name table record ID 16](https://docs.microsoft.com/en-us/typography/opentype/spec/name) edits + ### v0.3.0 -- bugfix: corrected PostScript nameID6 record suffix write. Previously spaces were not removed from this string value and they should be removed. +- bugfix: corrected PostScript name table record ID 6 suffix write. Previously spaces were not removed from this string value and they should be removed. - minor update to control flow statement to make it more concise - source code formatting improvements diff --git a/README.md b/README.md index 56801fb..a6eeb66 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,15 @@ ## About -`fontname.py` is a `.ttf` and `.otf` font renaming script that is developed in Python. It supports font renaming with current versions of the Python 2 and Python 3 interpreters. +`fontname.py` is a `.ttf` and `.otf` font renaming script that is developed in Python. It supports font renaming with the Python 3.6+ interpreter. ## Dependency -- [fonttools](https://github.com/fonttools/fonttools) Python library +- [fonttools](https://github.com/fonttools/fonttools) Python library (requires v4.0.0+) Install with: ``` -pip install fonttools +pip3 install fonttools ``` ## Usage @@ -18,31 +18,31 @@ pip install fonttools The script usage is as follows: ``` -$ python fontname.py [NEW FONT FAMILY NAME] [FONT PATH 1] +$ python3 fontname.py [NEW FONT FAMILY NAME] [FONT PATH 1] ``` -This script updates the OpenType name table records nameID 1, 4, and 6 with appropriately formatted font names using the font variant already defined in the font file and the new font family name defined by the user as the first command line argument. You can include any number of subsequent font file paths on the command line. The variant type will be detected in the OpenType tables of the font(s) on the filepaths that are passed as arguments on the command line and will be used to create new name strings in the OpenType tables. +This script updates the OpenType name table records nameID 1, 4, 6, and 16 with appropriately formatted font names using the font style definition in the font and the new font family name defined by the user as the first command line argument. You can include any number of subsequent font paths on the command line. The style will be detected in the OpenType tables of the fonts filepath arguments and will be used to create new name strings in the OpenType tables. **Note**: this re-writes the name tables in the fonts passed as arguments on the command line (i.e. writes files in place) so make copies first if you intend to maintain the fonts with the former naming for any reason (though you can simply re-write with the previous name if you forget...). ### Examples ``` -$ python fontname.py "Hack DEV" Hack-Regular.ttf +$ python3 fontname.py "Hack DEV" Hack-Regular.ttf ``` ![fscw-hack](https://user-images.githubusercontent.com/4249591/32151555-2a456982-bcf4-11e7-8ec8-57f8dbbd40a4.png) ``` -$ python fontname.py "Source Code Pro DEV" SourceCodePro-Regular.otf +$ python3 fontname.py "Source Code Pro DEV" SourceCodePro-Regular.otf ``` ![fscw-scp](https://user-images.githubusercontent.com/4249591/32151559-2e58a688-bcf4-11e7-9d39-7c8accdc41a6.png) ``` -$ python fontname.py "DejaVu Sans Mono DEV" DejaVuSansMono-Bold.ttf +$ python3 fontname.py "DejaVu Sans Mono DEV" DejaVuSansMono-Bold.ttf ``` ![fscw-djv](https://user-images.githubusercontent.com/4249591/32151564-3414a644-bcf4-11e7-93c3-93bc2bbaebdb.png)