Major overhaul, moving from UFO2 to Glyphs and UFO3, plus a brand new and much simpler fontbuild

This commit is contained in:
Rasmus Andersson 2018-09-03 12:55:49 -07:00
parent 8c1a4c181e
commit c833e252c9
5246 changed files with 346953 additions and 163499 deletions

View file

@ -1,36 +0,0 @@
#!/usr/bin/env python
# encoding: utf8
#
# Updates the "?v=x" in docs/inter-ui.css
#
from __future__ import print_function
import os, sys, re
from collections import OrderedDict
from ConfigParser import RawConfigParser
def main():
rootDir = os.path.dirname(os.path.dirname(__file__))
config = RawConfigParser(dict_type=OrderedDict)
config.read(os.path.join(rootDir, 'src', 'fontbuild.cfg'))
version = config.get('main', 'version')
regex = re.compile(r'(url\("[^"]+?v=)([^"]+)("\))')
cssFileName = os.path.join(rootDir, 'docs', 'inter-ui.css')
s = ''
with open(cssFileName, 'r') as f:
s = f.read()
s = regex.sub(
lambda m: '%s%s%s' % (m.group(1), version, m.group(3)),
s
)
with open(cssFileName, 'w') as f:
f.write(s)
if __name__ == '__main__':
main()