Minor fixes to reduce the number of code smells
This commit is contained in:
parent
080f580902
commit
5cda3d4e72
@ -4,7 +4,7 @@ from fontTools.misc.py23 import *
|
||||
_accessstrings = {0: "", 1: "readonly", 2: "executeonly", 3: "noaccess"}
|
||||
|
||||
|
||||
class ps_object:
|
||||
class ps_object(object):
|
||||
|
||||
literal = 1
|
||||
access = 0
|
||||
@ -204,7 +204,7 @@ class ps_real(ps_object):
|
||||
return repr(self.value)
|
||||
|
||||
|
||||
class PSOperators:
|
||||
class PSOperators(object):
|
||||
|
||||
def ps_def(self):
|
||||
obj = self.pop()
|
||||
|
@ -7,7 +7,6 @@ from fontTools.misc.py23 import *
|
||||
from fontTools import ttLib
|
||||
from fontTools.ttLib.tables import otTables
|
||||
from fontTools.misc import psCharStrings
|
||||
from fontTools.pens import basePen
|
||||
import sys
|
||||
import struct
|
||||
import time
|
||||
|
@ -3,6 +3,7 @@ from fontTools.misc.py23 import *
|
||||
from fontTools.misc import sstruct
|
||||
from fontTools.misc.textTools import safeEval
|
||||
from . import DefaultTable
|
||||
import pdb
|
||||
import struct
|
||||
|
||||
|
||||
@ -103,10 +104,10 @@ class table_M_E_T_A_(DefaultTable.DefaultTable):
|
||||
offsetOK = 0
|
||||
self.nMetaRecs = len(self.glyphRecords)
|
||||
count = 0
|
||||
while ( offsetOK != 1):
|
||||
while (offsetOK != 1):
|
||||
count = count + 1
|
||||
if count > 4:
|
||||
pdb_set_trace()
|
||||
pdb.set_trace()
|
||||
metaData = sstruct.pack(METAHeaderFormat, self)
|
||||
stringRecsOffset = len(metaData) + self.nMetaRecs * (6 + 2*(self.metaFlags & 1))
|
||||
stringRecSize = (6 + 2*(self.metaFlags & 1))
|
||||
@ -119,7 +120,7 @@ class table_M_E_T_A_(DefaultTable.DefaultTable):
|
||||
metaData = metaData + glyphRec.compile(self)
|
||||
stringRecsOffset = stringRecsOffset + (glyphRec.nMetaEntry * stringRecSize)
|
||||
# this will be the String Record offset for the next GlyphRecord.
|
||||
if offsetOK == -1:
|
||||
if offsetOK == -1:
|
||||
offsetOK = 0
|
||||
continue
|
||||
|
||||
|
@ -300,7 +300,6 @@ class table_S_V_G_(DefaultTable.DefaultTable):
|
||||
writer.newline()
|
||||
|
||||
def fromXML(self, name, attrs, content, ttFont):
|
||||
import re
|
||||
if name == "svgDoc":
|
||||
if not hasattr(self, "docList"):
|
||||
self.docList = []
|
||||
|
@ -1,11 +1,10 @@
|
||||
from __future__ import print_function, division, absolute_import
|
||||
from fontTools.misc.py23 import *
|
||||
from fontTools.misc import sstruct
|
||||
from fontTools.misc.textTools import readHex, safeEval, num2binary, binary2num
|
||||
from fontTools.misc.textTools import safeEval, num2binary, binary2num
|
||||
from . import DefaultTable
|
||||
from .sbixGlyph import *
|
||||
from .sbixStrike import *
|
||||
import struct
|
||||
|
||||
|
||||
sbixHeaderFormat = """
|
||||
|
Loading…
x
Reference in New Issue
Block a user