Detect both types of quotes when detecting OTF vs TTF XML.

Fixes: http://sourceforge.net/p/fonttools/bugs/47/

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@616 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
pabs3 2013-06-22 08:13:22 +00:00
parent 5f4193373b
commit e83b4c4482

View File

@ -68,6 +68,7 @@ def usage():
numberAddedRE = re.compile("(.*)#\d+$")
opentypeheaderRE = re.compile('''sfntVersion=['"]OTTO["']'''):
def makeOutputFileName(input, outputDir, extension):
dir, file = os.path.split(input)
@ -237,7 +238,7 @@ def guessFileType(fileName):
elif head in ("\0\1\0\0", "true"):
return "TTF"
elif head.lower() == "<?xm":
if header.find('sfntVersion="OTTO"') > 0:
if opentypeheaderRE.match(header):
return "OTX"
else:
return "TTX"