Skip to content

Commit 7b0c6ad

Browse files
committed
improve opening vfb files
dont validate on reading and force overwrite
1 parent 5454622 commit 7b0c6ad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/extractor/formats/vfb.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ def isVFB(pathOrFile):
2323

2424
def extractFontFromVFB(pathOrFile, destination, doGlyphs=True, doInfo=True, doKerning=True, doGroups=True, doFeatures=True, doLib=True, customFunctions=[]):
2525
ufoPath = tempfile.mkdtemp(suffix=".ufo")
26-
cmds = [_ufo2vfbLocation, "-64", pathOrFile, ufoPath]
26+
cmds = [_ufo2vfbLocation, "-64", "-fo", pathOrFile, ufoPath]
2727
cmds = subprocess.list2cmdline(cmds)
2828
popen = subprocess.Popen(cmds, shell=True)
2929
popen.wait()
3030
try:
3131
# vfb2ufo writes ufo2, and has no update since 2015...so dont get to crazy here...
32-
source = UFOReader(ufoPath)
32+
# dont validate as vfb2ufo writes invalid ufos
33+
source = UFOReader(ufoPath, validate=False)
3334
if doInfo:
3435
source.readInfo(destination.info)
3536
if doKerning:

0 commit comments

Comments
 (0)