Skip to content

Commit 03cd5cf

Browse files
committed
Add font rename script
1 parent a3a1f93 commit 03cd5cf

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

files/fonts/script.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from fontTools.ttLib import TTFont
2+
f = TTFont("NotoColorEmoji-Regular-CBDT.subset.ttf")
3+
name = f['name']
4+
def setName(nameID, string):
5+
print(name.names[nameID])
6+
name.names[nameID].string = string.encode('utf-16-be')
7+
print(name.names[nameID])
8+
setName(1, "Noto Color Emoji CBDT Subset") # family
9+
setName(3, "Noto Color Emoji CBDT Subset") # family
10+
setName(4, "Noto Color Emoji CBDT Subset") # full
11+
setName(6, "NotoColorEmojiCBDTSubset") # postscript
12+
13+
f.save("output.ttf")

0 commit comments

Comments
 (0)