1
1
mirror of https://github.com/rsms/inter.git synced 2024-12-25 08:33:40 +03:00

Improves glyphorder generation

This commit is contained in:
Rasmus Andersson 2017-08-31 08:16:38 -07:00
parent da49fd5536
commit 7e52b008d0
3 changed files with 929 additions and 7 deletions

View File

@ -126,14 +126,14 @@ install: all install_otf
glyphinfo: docs/lab/glyphinfo.json docs/glyphs/metrics.json
src/glyphorder.txt: $(all_ufo)
src/glyphorder.txt: $(all_ufo) misc/gen-glyphorder.py
misc/gen-glyphorder.py src/Interface-*.ufo > src/glyphorder.txt
docs/lab/glyphinfo.json: _local/UnicodeData.txt src/glyphorder.txt
docs/lab/glyphinfo.json: _local/UnicodeData.txt src/glyphorder.txt misc/gen-glyphinfo.py
misc/gen-glyphinfo.py -ucd _local/UnicodeData.txt \
src/Interface-*.ufo > docs/lab/glyphinfo.json
docs/glyphs/metrics.json: src/glyphorder.txt
docs/glyphs/metrics.json: src/glyphorder.txt misc/gen-metrics-and-svgs.py
misc/gen-metrics-and-svgs.py -f src/Interface-Regular.ufo

View File

@ -37,27 +37,33 @@ def main():
argparser.add_argument('fontPaths', metavar='<ufofile>', type=str, nargs='+', help='UFO files')
args = argparser.parse_args()
glyphorderUnion = OrderedDict()
srcdir = os.path.abspath(os.path.join(__file__, '..', '..'))
nameLists = []
fontPaths = []
for fontPath in args.fontPaths:
if 'regular' or 'Regular' in fontPath:
fontPaths = [fontPath] + fontPaths
else:
fontPaths.append(fontPath)
nameLists = []
for fontPath in fontPaths:
libPlist = plistlib.readPlist(os.path.join(fontPath, 'lib.plist'))
names = []
if 'public.glyphOrder' in libPlist:
nameLists.append(libPlist['public.glyphOrder'])
glyphorderUnion = OrderedDict()
for names in zip(*nameLists):
for name in names:
glyphorderUnion[name] = True
# add any composed glyphs to the end
diacriticComps = loadGlyphCompositions(os.path.join(srcdir, 'src', 'diacritics.txt'))
for name in diacriticComps.keys():
glyphorderUnion[name] = True
glyphorderUnionNames = glyphorderUnion.keys()
print('\n'.join(glyphorderUnionNames))

View File

@ -2219,3 +2219,919 @@ placeofinterestsign.specz.medium
.notdef
circleblack
circlewhite
cyrillicbreve
nbspace
Dcroat
Eth
hbar
Tbar
tbar
Agrave
Aacute
Acircumflex
Atilde
Adieresis
Aring
Aringacute
Ccedilla
Egrave
Eacute
Ecircumflex
Edieresis
Igrave
Iacute
Icircumflex
Idieresis
Ntilde
Ograve
Oacute
Ocircumflex
Otilde
Odieresis
Ugrave
Uacute
Ucircumflex
Udieresis
Yacute
agrave
aacute
acircumflex
atilde
adieresis
aring
aringacute
ccedilla
egrave
eacute
ecircumflex
edieresis
igrave
iacute
icircumflex
idieresis
ntilde
ograve
oacute
ocircumflex
otilde
odieresis
ugrave
uacute
ucircumflex
udieresis
yacute
ydieresis
Amacron
amacron
Abreve
abreve
Aogonek
aogonek
Cacute
cacute
Ccircumflex
ccircumflex
Ccaron
ccaron
Dcaron
dcaron
Emacron
emacron
Ebreve
ebreve
Edotaccent
edotaccent
Eogonek
eogonek
Ecaron
ecaron
Gcircumflex
gcircumflex
Gbreve
gbreve
Gcommaaccent
gcommaaccent
Hcircumflex
hcircumflex
Itilde
itilde
Imacron
imacron
Ibreve
ibreve
Iogonek
iogonek
Idotaccent
IJ
ij
Jcircumflex
jcircumflex
Kcommaaccent
kcommaaccent
Lacute
lacute
Lcommaaccent
lcommaaccent
Lcaron
lcaron
Ldot
ldot
Nacute
nacute
Ncommaaccent
ncommaaccent
Ncaron
ncaron
napostrophe
Omacron
omacron
Obreve
obreve
Ohungarumlaut
ohungarumlaut
Racute
racute
Rcommaaccent
rcommaaccent
Rcaron
rcaron
Sacute
sacute
Scircumflex
scircumflex
Scedilla
scedilla
Scaron
scaron
uni021A
uni021B
Tcaron
tcaron
Utilde
utilde
Umacron
umacron
Ubreve
ubreve
Uring
uring
Uhungarumlaut
uhungarumlaut
Uogonek
uogonek
Wcircumflex
wcircumflex
Ycircumflex
ycircumflex
Ydieresis
Zacute
zacute
Zdotaccent
zdotaccent
Zcaron
zcaron
AEacute
aeacute
Oslashacute
oslashacute
Alphatonos
Epsilontonos
Etatonos
Iotatonos
Omicrontonos
Upsilontonos
Omegatonos
iotadieresistonos
Alpha
Beta
Epsilon
Zeta
Eta
Iota
Kappa
Mu
Nu
Omicron
Rho
Tau
Upsilon
Chi
Iotadieresis
Upsilondieresis
alphatonos
epsilontonos
etatonos
iotatonos
upsilondieresistonos
kappa
omicron
nu
iotadieresis
upsilondieresis
omicrontonos
upsilontonos
omegatonos
Wgrave
wgrave
Wacute
wacute
Wdieresis
wdieresis
Ygrave
ygrave
minute
second
exclamdbl
uni0400
uni040D
uni0450
uni045D
uni04CF
Obar
uni04EC
uni04ED
uni0501
uni04F6
uni04F7
uni048C
uni04FE
uni04FF
uni0511
franc
LJ
Lj
lj
NJ
Nj
nj
Acaron
acaron
Icaron
icaron
Ocaron
ocaron
Ucaron
ucaron
eturn
AEmacron
aemacron
Gcaron
gcaron
Kcaron
kcaron
Oogonek
oogonek
Gacute
gacute
uni01F8
uni01F9
uni021E
uni021F
uni0226
uni0227
uni0228
uni0229
uni022A
uni022B
uni022C
uni022D
uni022E
uni022F
uni0230
uni0231
uni0232
uni0233
obar
uni0299
uni029C
uni037F
uni03F4
uni03F7
uni03F8
uni03F9
uni03FA
uni051A
uni051B
uni051C
uni051D
uni1F00
uni1F01
uni1F02
uni1F03
uni1F04
uni1F05
uni1F06
uni1F07
uni1F08
uni1F09
uni1F0A
uni1F0B
uni1F0C
uni1F0D
uni1F0E
uni1F0F
uni1F10
uni1F11
uni1F12
uni1F13
uni1F14
uni1F15
uni1F18
uni1F19
uni1F1A
uni1F1B
uni1F1C
uni1F1D
uni1F20
uni1F21
uni1F22
uni1F23
uni1F24
uni1F25
uni1F26
uni1F27
uni1F28
uni1F29
uni1F2A
uni1F2B
uni1F2C
uni1F2D
uni1F2E
uni1F2F
uni1F30
uni1F31
uni1F32
uni1F33
uni1F34
uni1F35
uni1F36
uni1F37
uni1F38
uni1F39
uni1F3A
uni1F3B
uni1F3C
uni1F3D
uni1F3E
uni1F3F
uni1F40
uni1F41
uni1F42
uni1F43
uni1F44
uni1F45
uni1F48
uni1F49
uni1F4A
uni1F4B
uni1F4C
uni1F4D
uni1F50
uni1F51
uni1F52
uni1F53
uni1F54
uni1F55
uni1F56
uni1F57
uni1F59
uni1F5B
uni1F5D
uni1F5F
uni1F60
uni1F61
uni1F62
uni1F63
uni1F64
uni1F65
uni1F66
uni1F67
uni1F68
uni1F69
uni1F6A
uni1F6B
uni1F6C
uni1F6D
uni1F6E
uni1F6F
uni1F70
uni1F71
uni1F72
uni1F73
uni1F74
uni1F75
uni1F76
uni1F77
uni1F78
uni1F79
uni1F7A
uni1F7B
uni1F7C
uni1F7D
uni1F80
uni1F81
uni1F82
uni1F83
uni1F84
uni1F85
uni1F86
uni1F87
uni1F88
uni1F89
uni1F8A
uni1F8B
uni1F8C
uni1F8D
uni1F8E
uni1F8F
uni1F90
uni1F91
uni1F92
uni1F93
uni1F94
uni1F95
uni1F96
uni1F97
uni1F98
uni1F99
uni1F9A
uni1F9B
uni1F9C
uni1F9D
uni1F9E
uni1F9F
uni1FA0
uni1FA1
uni1FA2
uni1FA3
uni1FA4
uni1FA5
uni1FA6
uni1FA7
uni1FA8
uni1FA9
uni1FAA
uni1FAB
uni1FAC
uni1FAD
uni1FAE
uni1FAF
uni1FB0
uni1FB1
uni1FB2
uni1FB3
uni1FB4
uni1FB6
uni1FB7
uni1FB8
uni1FB9
uni1FBA
uni1FBB
uni1FBC
uni1FC2
uni1FC3
uni1FC4
uni1FC6
uni1FC7
uni1FC8
uni1FC9
uni1FCA
uni1FCB
uni1FCC
uni1FD0
uni1FD1
uni1FD2
uni1FD3
uni1FD6
uni1FD7
uni1FD8
uni1FD9
uni1FDA
uni1FDB
uni1FE0
uni1FE1
uni1FE2
uni1FE3
uni1FE4
uni1FE5
uni1FE6
uni1FE7
uni1FE8
uni1FE9
uni1FEA
uni1FEB
uni1FEC
uni1FF2
uni1FF3
uni1FF4
uni1FF6
uni1FF7
uni1FF8
uni1FF9
uni1FFA
uni1FFB
uni1FFC
uni202F
uni2047
uni2048
uni2049
uni205F
uniA78F
Aogonek.NAV
aogonek.NAV
Eogonek.NAV
eogonek.NAV
Oogonek.NAV
oogonek.NAV
uni1E2D.ccmp
uni1ECB.ccmp
softhyphen
Cdotaccent
cdotaccent
Gdotaccent
gdotaccent
Scommaaccent
scommaaccent
Tcommaaccent
tcommaaccent
mugreek
afii10023
afii10052
afii10054
afii10055
afii10056
afii10057
afii10061
afii10062
afii10017
afii10019
afii10020
afii10022
afii10027
afii10030
afii10031
afii10032
afii10033
afii10034
afii10035
afii10036
afii10039
afii10065
iecyrillic
iishortcyrillic
ocyrillic
ercyrillic
escyrillic
ucyrillic
khacyrillic
iocyrillic
gjecyrillic
dzecyrillic
icyrillic
yicyrillic
jecyrillic
kjecyrillic
ushortcyrillic
jcaron
apostrophemod
Macute
macute
Aringbelow
aringbelow
Psicyrillic
psicyrillic
Izhitsadblgravecyrillic
izhitsadblgravecyrillic
ukcyrillic
Ukcyrillic
Zedescendercyrillic
zedescendercyrillic
Esdescendercyrillic
esdescendercyrillic
Ustraightcyrillic
ustraightcyrillic
palochkacyrillic
Zhebrevecyrillic
zhebrevecyrillic
Abrevecyrillic
abrevecyrillic
Adieresiscyrillic
adieresiscyrillic
Aiecyrillic
aiecyrillic
Iebrevecyrillic
iebrevecyrillic
Schwadieresiscyrillic
schwacyrillic
schwadieresiscyrillic
Zhedieresiscyrillic
zhedieresiscyrillic
Zedieresiscyrillic
zedieresiscyrillic
Imacroncyrillic
imacroncyrillic
Idieresiscyrillic
idieresiscyrillic
Odieresiscyrillic
odieresiscyrillic
Obarredcyrillic
obarredcyrillic
Obarreddieresiscyrillic
obarreddieresiscyrillic
Umacroncyrillic
umacroncyrillic
Udieresiscyrillic
udieresiscyrillic
Uhungarumlautcyrillic
uhungarumlautcyrillic
Chedieresiscyrillic
chedieresiscyrillic
Yerudieresiscyrillic
yerudieresiscyrillic
Adotbelow
adotbelow
Ahookabove
ahookabove
Acircumflexacute
acircumflexacute
Acircumflexgrave
acircumflexgrave
Acircumflexhookabove
acircumflexhookabove
Acircumflextilde
acircumflextilde
Acircumflexdotbelow
acircumflexdotbelow
Abreveacute
abreveacute
Abrevegrave
abrevegrave
Abrevehookabove
abrevehookabove
Abrevetilde
abrevetilde
Abrevedotbelow
abrevedotbelow
Edotbelow
edotbelow
Ehookabove
ehookabove
Etilde
etilde
Ecircumflexacute
ecircumflexacute
Ecircumflexgrave
ecircumflexgrave
Ecircumflexhookabove
ecircumflexhookabove
Ecircumflextilde
ecircumflextilde
Ecircumflexdotbelow
ecircumflexdotbelow
Ihookabove
ihookabove
Idotbelow
idotbelow
Odotbelow
odotbelow
Ohookabove
ohookabove
Ocircumflexacute
ocircumflexacute
Ocircumflexgrave
ocircumflexgrave
Ocircumflexhookabove
ocircumflexhookabove
Ocircumflextilde
ocircumflextilde
Ocircumflexdotbelow
ocircumflexdotbelow
Ohornacute
ohornacute
Ohorngrave
ohorngrave
Ohornhookabove
ohornhookabove
Ohorntilde
ohorntilde
Ohorndotbelow
ohorndotbelow
Udotbelow
udotbelow
Uhookabove
uhookabove
Uhornacute
uhornacute
Uhorngrave
uhorngrave
Uhornhookabove
uhornhookabove
Uhorntilde
uhorntilde
Uhorndotbelow
uhorndotbelow
Ydotbelow
ydotbelow
Yhookabove
yhookabove
Ytilde
ytilde
dong
Tedescendercyrillic
tedescendercyrillic
Chekhakassiancyrillic
chekhakassiancyrillic
Chedescenderabkhasiancyrillic
chedescenderabkhasiancyrillic
shhacyrillic
afii10146
Ghestrokecyrillic
ghestrokecyrillic
Ustraightstrokecyrillic
ustraightstrokecyrillic
horizontalbar
ypogegrammeni
nlegrightlong
Udieresismacron
udieresismacron
Udieresisacute
udieresisacute
Udieresiscaron
udieresiscaron
Udieresisgrave
udieresisgrave
Adieresismacron
adieresismacron
Adotmacron
adotmacron
Oogonekmacron
oogonekmacron
DZ
Dz
Adblgrave
adblgrave
Ainvertedbreve
ainvertedbreve
Edblgrave
edblgrave
Einvertedbreve
einvertedbreve
Idblgrave
idblgrave
Iinvertedbreve
iinvertedbreve
Odblgrave
odblgrave
Oinvertedbreve
oinvertedbreve
Rdblgrave
rdblgrave
Rinvertedbreve
rinvertedbreve
Udblgrave
udblgrave
Uinvertedbreve
uinvertedbreve
Upsilonacutehooksymbolgreek
Upsilondieresishooksymbolgreek
sigmalunatesymbolgreek
yotgreek
Bdotaccent
bdotaccent
Bdotbelow
bdotbelow
Blinebelow
blinebelow
Ccedillaacute
ccedillaacute
Ddotaccent
ddotaccent
Ddotbelow
ddotbelow
Dlinebelow
dlinebelow
Dcedilla
dcedilla
Dcircumflexbelow
dcircumflexbelow
Emacrongrave
emacrongrave
Emacronacute
emacronacute
Ecircumflexbelow
ecircumflexbelow
Etildebelow
etildebelow
Ecedillabreve
ecedillabreve
Fdotaccent
fdotaccent
Gmacron
gmacron
Hdotaccent
hdotaccent
Hdotbelow
hdotbelow
Hdieresis
hdieresis
Hbrevebelow
hbrevebelow
Kacute
kacute
Kdotbelow
kdotbelow
Klinebelow
klinebelow
Ldotbelow
ldotbelow
Ldotbelowmacron
ldotbelowmacron
Llinebelow
llinebelow
Lcircumflexbelow
lcircumflexbelow
Mdotaccent
mdotaccent
Mdotbelow
mdotbelow
Ndotaccent
ndotaccent
Ndotbelow
ndotbelow
Nlinebelow
nlinebelow
Ncircumflexbelow
ncircumflexbelow
Otildeacute
otildeacute
Otildedieresis
otildedieresis
Omacrongrave
omacrongrave
Omacronacute
omacronacute
Pacute
pacute
Pdotaccent
pdotaccent
Rdotaccent
rdotaccent
Rdotbelow
rdotbelow
Rdotbelowmacron
rdotbelowmacron
Rlinebelow
rlinebelow
Sdotaccent
sdotaccent
Sdotbelow
sdotbelow
Sacutedotaccent
sacutedotaccent
Scarondotaccent
scarondotaccent
Sdotbelowdotaccent
sdotbelowdotaccent
Tdotaccent
tdotaccent
Tdotbelow
tdotbelow
Tlinebelow
tlinebelow
Tcircumflexbelow
tcircumflexbelow
Udieresisbelow
udieresisbelow
Utildebelow
utildebelow
Ucircumflexbelow
ucircumflexbelow
Utildeacute
utildeacute
Umacrondieresis
umacrondieresis
Vtilde
vtilde
Vdotbelow
vdotbelow
Wdotaccent
wdotaccent
Wdotbelow
wdotbelow
Xdotaccent
xdotaccent
Xdieresis
xdieresis
Ydotaccent
ydotaccent
Zcircumflex
zcircumflex
Zdotbelow
zdotbelow
Zlinebelow
zlinebelow
hlinebelow
tdieresis
wring
yring
arighthalfring