Skip to content

Commit bdd7464

Browse files
committed
v1.0.0
1 parent 1697249 commit bdd7464

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
## Changelog
22

3+
### v1.0.0
4+
5+
- refactor fontname.py script to support Python 3.6+ interpreter only
6+
- drop support for all versions of the Python 2 interpreter
7+
- black source formatting
8+
- add support for [name table record ID 16](https://docs.microsoft.com/en-us/typography/opentype/spec/name) edits
9+
310
### v0.3.0
411

5-
- bugfix: corrected PostScript nameID6 record suffix write. Previously spaces were not removed from this string value and they should be removed.
12+
- bugfix: corrected PostScript name table record ID 6 suffix write. Previously spaces were not removed from this string value and they should be removed.
613
- minor update to control flow statement to make it more concise
714
- source code formatting improvements
815

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@
22

33
## About
44

5-
`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.
5+
`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.
66

77
## Dependency
8-
- [fonttools](https://github.com/fonttools/fonttools) Python library
8+
- [fonttools](https://github.com/fonttools/fonttools) Python library (requires v4.0.0+)
99

1010
Install with:
1111

1212
```
13-
pip install fonttools
13+
pip3 install fonttools
1414
```
1515

1616
## Usage
1717

1818
The script usage is as follows:
1919

2020
```
21-
$ python fontname.py [NEW FONT FAMILY NAME] [FONT PATH 1] <FONT PATH ...>
21+
$ python3 fontname.py [NEW FONT FAMILY NAME] [FONT PATH 1] <FONT PATH ...>
2222
```
2323

24-
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.
24+
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.
2525

2626
**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...).
2727

2828
### Examples
2929

3030
```
31-
$ python fontname.py "Hack DEV" Hack-Regular.ttf
31+
$ python3 fontname.py "Hack DEV" Hack-Regular.ttf
3232
```
3333

3434
![fscw-hack](https://user-images.githubusercontent.com/4249591/32151555-2a456982-bcf4-11e7-8ec8-57f8dbbd40a4.png)
3535

3636

3737
```
38-
$ python fontname.py "Source Code Pro DEV" SourceCodePro-Regular.otf
38+
$ python3 fontname.py "Source Code Pro DEV" SourceCodePro-Regular.otf
3939
```
4040

4141
![fscw-scp](https://user-images.githubusercontent.com/4249591/32151559-2e58a688-bcf4-11e7-9d39-7c8accdc41a6.png)
4242

4343

4444
```
45-
$ python fontname.py "DejaVu Sans Mono DEV" DejaVuSansMono-Bold.ttf
45+
$ python3 fontname.py "DejaVu Sans Mono DEV" DejaVuSansMono-Bold.ttf
4646
```
4747

4848
![fscw-djv](https://user-images.githubusercontent.com/4249591/32151564-3414a644-bcf4-11e7-93c3-93bc2bbaebdb.png)

0 commit comments

Comments
 (0)