[ttLib] remove 'haveMacSupport' flag, allow other platforms to read sfnt resources (from data fork)

On non-Mac filesystems the resource fork is absent.
This commit is contained in:
Cosimo Lupo 2015-10-25 14:53:03 +00:00
parent 8891e98920
commit d7f6e1df00

View File

@ -46,10 +46,6 @@ from fontTools.misc.py23 import *
import os
import sys
haveMacSupport = 0
if sys.platform == "darwin":
haveMacSupport = 1
class TTLibError(Exception): pass
@ -146,8 +142,8 @@ class TTFont(object):
if not hasattr(file, "read"):
closeStream = True
# assume file is a string
if haveMacSupport and res_name_or_index is not None:
# on the mac, we deal with sfnt resources as well as flat files
if res_name_or_index is not None:
# see if it contains 'sfnt' resources in the resource or data fork
from . import macUtils
if res_name_or_index == 0:
if macUtils.getSFNTResIndices(file):