UPM 2048 and opsz axis (#462)
- UPM is adjusted to 2048 - Additional opsz VF axis (multi master) added which will eventually replace the separate Display family - New tooling that uses fontmake instead of Inter's own fontbuild toolchain. (The old toolchain is still supported, i.e. `make -f Makefile_v1.make ...`)
This commit is contained in:
parent
633839ad55
commit
0796076659
29 changed files with 368192 additions and 287323 deletions
32
misc/tools/patch-version.py
Normal file
32
misc/tools/patch-version.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Updates "?v=x" in files
|
||||
import os, sys, re
|
||||
from os.path import dirname, basename, abspath, relpath, join as pjoin
|
||||
sys.path.append(abspath(pjoin(dirname(__file__), 'tools')))
|
||||
from common import BASEDIR, getVersion
|
||||
|
||||
version = getVersion()
|
||||
|
||||
def updateCSSFile(filename):
|
||||
regex = re.compile(r'(url\("[^"]+?v=)([^"]+)("\))')
|
||||
with open(filename, 'r') as f:
|
||||
s = f.read()
|
||||
s = regex.sub(lambda m: '%s%s%s' % (m.group(1), version, m.group(3)), s)
|
||||
with open(filename, 'w') as f:
|
||||
f.write(s)
|
||||
|
||||
|
||||
def updateHTMLFile(filename):
|
||||
regex = re.compile(r'((?:href|src)="[^"]+?v=)([^"]+)(")')
|
||||
with open(filename, 'r') as f:
|
||||
s = f.read()
|
||||
s = regex.sub(lambda m: '%s%s%s' % (m.group(1), version, m.group(3)), s)
|
||||
with open(filename, 'w') as f:
|
||||
f.write(s)
|
||||
|
||||
for fn in sys.argv[1:]:
|
||||
if fn.endswith(".css"):
|
||||
updateCSSFile(fn)
|
||||
elif fn.endswith(".html"):
|
||||
updateHTMLFile(fn)
|
||||
else:
|
||||
raise "Unexpected file type %r" % fn
|
||||
Reference in a new issue