-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWalkThroughGlyphs.py
56 lines (44 loc) · 2.43 KB
/
WalkThroughGlyphs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import os
import random
import re
from datetime import datetime
now = datetime.now()
dateNow = now.strftime("%d/%m/%Y %H:%M:%S")
#you can just use the Masters exports (delete other fonts), and export the original file and add 'Original' after the name eg, MFFlapperOriginal. Then check the regex for original fonts list creation.
folder = 'Directory'
#WordLists are courtesy of https://github.com/dwyl/english-words
words = 'Directory'
AllGlyphs = """AÁĂÂÄÀĀĄÅÃÆBCĆČÇĊDÐĎĐEÉĚÊËĖÈĒĘFGĞĢĠHĦIIJÍÎÏİÌĪĮJKĶLĹĽĻĿŁMNŃŇŅÑŊOÓÔÖÒŐŌØÕŒPÞQRŔŘŖSŚŠŞȘẞƏTŦŤŢȚUÚÛÜÙŰŪŲŮVWẂŴẄẀXYÝŶŸỲZŹŽŻaáăâäàāąåãæbcćčçċdðďđeéěêëėèēęəfgğģġhħiıíîïìijīįjȷkķlĺľļŀłmnńňņñŋoóôöòőōøõœpþqrŕřŗsśšşșßtŧťţțuúûüùűūųůvwẃŵẅẁxyýŷÿỳzźžżªºΔΩμπ0123456789⓿❶❷❸❹❺❻❼❽❾⓪①②③④⑤⑥⑦⑧⑨ ⁰¹²³⁴⁵⁶⁷⁸⁹⁄½⅓⅔¼¾⅛⅜⅝⅞.,:;…!¡?¿·•*⁂#․//\⁑-–—_ (){}[] ‚„“”‘’«»‹›"'ƒ☺@&¶§©®℗™°|¦†‡℮№℠₿¢¤$€£¥+−×÷=≠><≥≤±≈~¬^∞∅∫∏∑√µ∂%‰↑↗→↘↓↙←↖↔↕↰↱↲↳●○◊■□▲△"""
Letters = "AÆBCDÐEFGHIJKLMNOŒ\nPÞQRSẞƏTUVWXYZ"
Figures = "0123456789"
Symbols = "ƒ☺@&¶§©®℗™°|¦†‡℮℠¤£+−×÷=<≤±~¬^∞∅∫∏∑√∂"
def fontName(folder):
names = []
for name in os.listdir(folder):
if os.path.isfile(os.path.join(folder, name)):
if (".otf" in name) and ("Original" not in name):
names.append(name)
return names
FontNames = fontName(folder)
OriginalFonts = []
#Make a list of Original Fonts
for a in FontNames:
#print(a[:9])
OriginalFonts.append(a[:9]+'Original'+a[9:])
#Generating The Old and New Comparison
#Should be a separate function that takes a predifined param, such as lowercase, uppercase, figures, symbols.
for pages in FontNames:
for glyphs in AllGlyphs:
path = 'Directory/{f}'.format(f = pages)
newPage(500, 500)
print(glyphs)
#FontName
text(pages, (50, height()-50))
#DateTime
text(dateNow, (50, 50))
#New(Bottom)
font(path)
fontSize(200)
textBox(glyphs,
(100, 100, 300, 300), align="center")
# saveImage("~/Desktop/{filename}.gif")