py23 Use new-style classes
Such that we get the same semantics in both Python 2 and 3.
diff --git a/Lib/fontTools/afmLib.py b/Lib/fontTools/afmLib.py
index 9ef5951..ac31563 100644
--- a/Lib/fontTools/afmLib.py
+++ b/Lib/fontTools/afmLib.py
@@ -83,7 +83,7 @@
class error(Exception): pass
-class AFM:
+class AFM(object):
_attrs = None
diff --git a/Lib/fontTools/cffLib.py b/Lib/fontTools/cffLib.py
index cf973e9..9265ebc 100644
--- a/Lib/fontTools/cffLib.py
+++ b/Lib/fontTools/cffLib.py
@@ -21,7 +21,7 @@
offSize: B
"""
-class CFFFontSet:
+class CFFFontSet(object):
def __init__(self):
pass
@@ -126,7 +126,7 @@
self.GlobalSubrs.append(subr)
-class CFFWriter:
+class CFFWriter(object):
def __init__(self):
self.data = []
@@ -180,7 +180,7 @@
return offSize
-class IndexCompiler:
+class IndexCompiler(object):
def __init__(self, items, strings, parent):
self.items = self.getItems(items, strings)
@@ -303,7 +303,7 @@
self.parent.rawDict["CharStrings"] = pos
-class Index:
+class Index(object):
"""This class represents what the CFF spec calls an INDEX."""
@@ -500,7 +500,7 @@
self.gidArray.append(fdSelectValue)
-class CharStrings:
+class CharStrings(object):
def __init__(self, file, charset, globalSubrs, private, fdSelect, fdArray):
if file is not None:
@@ -662,7 +662,7 @@
return d
-class SimpleConverter:
+class SimpleConverter(object):
def read(self, parent, value):
return value
def write(self, parent, value):
@@ -783,7 +783,7 @@
charStrings.fromXML(name, attrs, content)
return charStrings
-class CharsetConverter:
+class CharsetConverter(object):
def read(self, parent, value):
isCID = hasattr(parent, "ROS")
if value > 2:
@@ -827,7 +827,7 @@
return safeEval(attrs["value"])
-class CharsetCompiler:
+class CharsetCompiler(object):
def __init__(self, strings, charset, parent):
assert charset[0] == '.notdef'
@@ -936,7 +936,7 @@
return charset
-class EncodingCompiler:
+class EncodingCompiler(object):
def __init__(self, strings, encoding, parent):
assert not isinstance(encoding, basestring)
@@ -1121,7 +1121,7 @@
return fdArray
-class FDSelectConverter:
+class FDSelectConverter(object):
def read(self, parent, value):
file = parent.file
@@ -1177,7 +1177,7 @@
return bytesjoin(data)
-class FDSelectCompiler:
+class FDSelectCompiler(object):
def __init__(self, fdSelect, parent):
format = fdSelect.format
@@ -1315,7 +1315,7 @@
operators = buildOperatorDict(privateDictOperators)
-class DictCompiler:
+class DictCompiler(object):
def __init__(self, dictObj, strings, parent):
assert isinstance(strings, IndexedStrings)
@@ -1471,7 +1471,7 @@
return children
-class BaseDict:
+class BaseDict(object):
def __init__(self, strings=None, file=None, offset=None):
self.rawDict = {}
@@ -1603,7 +1603,7 @@
compilerClass = PrivateDictCompiler
-class IndexedStrings:
+class IndexedStrings(object):
"""SID -> string mapping."""
diff --git a/Lib/fontTools/fondLib.py b/Lib/fontTools/fondLib.py
index 536c694..c104d9e 100644
--- a/Lib/fontTools/fondLib.py
+++ b/Lib/fontTools/fondLib.py
@@ -29,7 +29,7 @@
FONDheadersize = 52
-class FontFamily:
+class FontFamily(object):
def __init__(self, theRes, mode = 'r'):
self.ID, type, self.name = theRes.GetResInfo()
@@ -464,7 +464,7 @@
lwfnname = lwfnname + part[:3]
return lwfnname
-class BitmapFontFile:
+class BitmapFontFile(object):
def __init__(self, path, mode='r'):
if mode == 'r':
@@ -507,7 +507,7 @@
self.resref = None
-class FondSelector:
+class FondSelector(object):
def __init__(self, fondlist):
import W
diff --git a/Lib/fontTools/misc/homeResFile.py b/Lib/fontTools/misc/homeResFile.py
index 409f30d..dc61c2f 100644
--- a/Lib/fontTools/misc/homeResFile.py
+++ b/Lib/fontTools/misc/homeResFile.py
@@ -51,7 +51,7 @@
ioFCBParID: l
"""
-class ParamBlock:
+class ParamBlock(object):
"""Wrapper for the very low level FCBPB record."""
diff --git a/Lib/fontTools/misc/psCharStrings.py b/Lib/fontTools/misc/psCharStrings.py
index 84e9a69..34ace23 100644
--- a/Lib/fontTools/misc/psCharStrings.py
+++ b/Lib/fontTools/misc/psCharStrings.py
@@ -35,7 +35,7 @@
realNibblesDict[realNibbles[_i]] = _i
-class ByteCodeBase:
+class ByteCodeBase(object):
def read_byte(self, b0, data, index):
return b0 - 139, index
@@ -482,7 +482,7 @@
self.width = extractor.width
-class SimpleT2Decompiler:
+class SimpleT2Decompiler(object):
def __init__(self, localSubrs, globalSubrs):
self.localSubrs = localSubrs
diff --git a/Lib/fontTools/misc/sstruct.py b/Lib/fontTools/misc/sstruct.py
index 4c286e0..722762d 100644
--- a/Lib/fontTools/misc/sstruct.py
+++ b/Lib/fontTools/misc/sstruct.py
@@ -185,7 +185,7 @@
print('size:', calcsize(format))
- class foo:
+ class foo(object):
pass
i = foo()
diff --git a/Lib/fontTools/misc/transform.py b/Lib/fontTools/misc/transform.py
index fed8e9b..a7e8539 100644
--- a/Lib/fontTools/misc/transform.py
+++ b/Lib/fontTools/misc/transform.py
@@ -66,7 +66,7 @@
return v
-class Transform:
+class Transform(object):
"""2x2 transformation matrix plus offset, a.k.a. Affine transform.
Transform instances are immutable: all transforming methods, eg.
diff --git a/Lib/fontTools/misc/xmlReader.py b/Lib/fontTools/misc/xmlReader.py
index 8671793..085e057 100644
--- a/Lib/fontTools/misc/xmlReader.py
+++ b/Lib/fontTools/misc/xmlReader.py
@@ -11,7 +11,7 @@
BUFSIZE = 0x4000
-class XMLReader:
+class XMLReader(object):
def __init__(self, fileName, ttFont, progress=None, quiet=False):
self.ttFont = ttFont
@@ -116,7 +116,7 @@
self.root = None
-class ProgressPrinter:
+class ProgressPrinter(object):
def __init__(self, title, maxval=100):
print(title)
diff --git a/Lib/fontTools/misc/xmlWriter.py b/Lib/fontTools/misc/xmlWriter.py
index 11e8289..6862e91 100644
--- a/Lib/fontTools/misc/xmlWriter.py
+++ b/Lib/fontTools/misc/xmlWriter.py
@@ -9,7 +9,7 @@
INDENT = " "
-class XMLWriter:
+class XMLWriter(object):
def __init__(self, fileOrPath, indentwhite=INDENT, idlefunc=None):
if not hasattr(fileOrPath, "write"):
diff --git a/Lib/fontTools/nfntLib.py b/Lib/fontTools/nfntLib.py
index 49cea20..ea2c9ee 100644
--- a/Lib/fontTools/nfntLib.py
+++ b/Lib/fontTools/nfntLib.py
@@ -25,7 +25,7 @@
assert headerSize == 26
-class NFNT:
+class NFNT(object):
def __init__(self, data=None):
if data is not None:
@@ -259,7 +259,7 @@
return width, srcbounds, destbounds
-class Glyph:
+class Glyph(object):
def __init__(self, width, offset, pixels=None, pixelDepth=1):
self.width = width
diff --git a/Lib/fontTools/t1Lib.py b/Lib/fontTools/t1Lib.py
index 02b5257..610c4be 100644
--- a/Lib/fontTools/t1Lib.py
+++ b/Lib/fontTools/t1Lib.py
@@ -43,7 +43,7 @@
class T1Error(Exception): pass
-class T1Font:
+class T1Font(object):
"""Type 1 font class.
diff --git a/Lib/fontTools/ttLib/__init__.py b/Lib/fontTools/ttLib/__init__.py
index 8cd2db1..bb9f262 100644
--- a/Lib/fontTools/ttLib/__init__.py
+++ b/Lib/fontTools/ttLib/__init__.py
@@ -61,7 +61,7 @@
class TTLibError(Exception): pass
-class TTFont:
+class TTFont(object):
"""The main font object. It manages file input and output, and offers
a convenient way of accessing tables.
@@ -650,7 +650,7 @@
raise TTLibError("Font contains no outlines")
-class _TTGlyphSet:
+class _TTGlyphSet(object):
"""Generic dict-like GlyphSet class, meant as a TrueType counterpart
to CFF's CharString dict. See TTFont.getGlyphSet().
@@ -681,7 +681,7 @@
return default
-class _TTGlyph:
+class _TTGlyph(object):
"""Wrapper for a TrueType glyph that supports the Pen protocol, meaning
that it has a .draw() method that takes a pen object as its only
@@ -742,7 +742,7 @@
pen.closePath()
-class GlyphOrder:
+class GlyphOrder(object):
"""A pseudo table. The glyph order isn't in the font as a separate
table, but it's nice to present it as such in the TTX format.
diff --git a/Lib/fontTools/ttLib/macUtils.py b/Lib/fontTools/ttLib/macUtils.py
index bd9521b..c7c261d 100644
--- a/Lib/fontTools/ttLib/macUtils.py
+++ b/Lib/fontTools/ttLib/macUtils.py
@@ -54,7 +54,7 @@
return fonts
-class SFNTResourceReader:
+class SFNTResourceReader(object):
"""Simple (Mac-only) read-only file wrapper for 'sfnt' resources."""
@@ -74,7 +74,7 @@
return getattr(self.file, attr)
-class SFNTResourceWriter:
+class SFNTResourceWriter(object):
"""Simple (Mac-only) file wrapper for 'sfnt' resources."""
diff --git a/Lib/fontTools/ttLib/sfnt.py b/Lib/fontTools/ttLib/sfnt.py
index 30c48bc..da5c79d 100644
--- a/Lib/fontTools/ttLib/sfnt.py
+++ b/Lib/fontTools/ttLib/sfnt.py
@@ -18,7 +18,7 @@
import struct
-class SFNTReader:
+class SFNTReader(object):
def __init__(self, file, checkChecksums=1, fontNumber=-1):
self.file = file
@@ -101,7 +101,7 @@
self.file.close()
-class SFNTWriter:
+class SFNTWriter(object):
def __init__(self, file, numTables, sfntVersion="\000\001\000\000",
flavor=None, flavorData=None):
@@ -340,7 +340,7 @@
woffDirectoryEntrySize = sstruct.calcsize(woffDirectoryEntryFormat)
-class DirectoryEntry:
+class DirectoryEntry(object):
def __init__(self):
self.uncompressed = False # if True, always embed entry raw
diff --git a/Lib/fontTools/ttLib/tables/BitmapGlyphMetrics.py b/Lib/fontTools/ttLib/tables/BitmapGlyphMetrics.py
index 620d3a1..6e5e1f0 100644
--- a/Lib/fontTools/ttLib/tables/BitmapGlyphMetrics.py
+++ b/Lib/fontTools/ttLib/tables/BitmapGlyphMetrics.py
@@ -27,7 +27,7 @@
Advance: B
"""
-class BitmapGlyphMetrics:
+class BitmapGlyphMetrics(object):
def toXML(self, writer, ttFont):
writer.begintag(self.__class__.__name__)
diff --git a/Lib/fontTools/ttLib/tables/C_O_L_R_.py b/Lib/fontTools/ttLib/tables/C_O_L_R_.py
index 22aea6c..31ef729 100644
--- a/Lib/fontTools/ttLib/tables/C_O_L_R_.py
+++ b/Lib/fontTools/ttLib/tables/C_O_L_R_.py
@@ -138,7 +138,7 @@
elif glyphSelector in self.ColorLayers:
del self.ColorLayers[glyphSelector]
-class LayerRecord:
+class LayerRecord(object):
def __init__(self, name = None, colorID = None):
self.name = name
diff --git a/Lib/fontTools/ttLib/tables/C_P_A_L_.py b/Lib/fontTools/ttLib/tables/C_P_A_L_.py
index 82a9b57..fc96caa 100644
--- a/Lib/fontTools/ttLib/tables/C_P_A_L_.py
+++ b/Lib/fontTools/ttLib/tables/C_P_A_L_.py
@@ -72,7 +72,7 @@
value = safeEval(attrs["value"])
setattr(self, name, value)
-class Color:
+class Color(object):
def __init__(self, blue=None, green=None, red=None, alpha=None):
self.blue = blue
diff --git a/Lib/fontTools/ttLib/tables/D_S_I_G_.py b/Lib/fontTools/ttLib/tables/D_S_I_G_.py
index f56e32d..20f14ee 100644
--- a/Lib/fontTools/ttLib/tables/D_S_I_G_.py
+++ b/Lib/fontTools/ttLib/tables/D_S_I_G_.py
@@ -112,7 +112,7 @@
s = s[76:]
return strjoin(items)
-class SignatureRecord:
+class SignatureRecord(object):
def __repr__(self):
return "<%s: %s>" % (self.__class__.__name__, self.__dict__)
diff --git a/Lib/fontTools/ttLib/tables/DefaultTable.py b/Lib/fontTools/ttLib/tables/DefaultTable.py
index 1532e1e..5951a0b 100644
--- a/Lib/fontTools/ttLib/tables/DefaultTable.py
+++ b/Lib/fontTools/ttLib/tables/DefaultTable.py
@@ -1,7 +1,7 @@
from __future__ import print_function, division
from fontTools.misc.py23 import *
-class DefaultTable:
+class DefaultTable(object):
dependencies = []
diff --git a/Lib/fontTools/ttLib/tables/E_B_D_T_.py b/Lib/fontTools/ttLib/tables/E_B_D_T_.py
index 52bda76..ab2b8f4 100644
--- a/Lib/fontTools/ttLib/tables/E_B_D_T_.py
+++ b/Lib/fontTools/ttLib/tables/E_B_D_T_.py
@@ -175,7 +175,7 @@
assert self.strikeData[strikeIndex] == None, "Duplicate strike EBDT indices."
self.strikeData[strikeIndex] = bitmapGlyphDict
-class EbdtComponent:
+class EbdtComponent(object):
def toXML(self, writer, ttFont):
writer.begintag('ebdtComponent', [('name', self.name)])
@@ -364,7 +364,7 @@
# in XML.
_bitmapGlyphSubclassPrefix = 'ebdt_bitmap_format_'
-class BitmapGlyph:
+class BitmapGlyph(object):
# For the external file format. This can be changed in subclasses. This way
# when the extfile option is turned on files have the form: glyphName.ext
@@ -459,7 +459,7 @@
metricsId = metricStrings.index(curMetricsName)
oppositeMetricsName = metricStrings[1-metricsId]
- class BitmapPlusMetricsMixin:
+ class BitmapPlusMetricsMixin(object):
def writeMetrics(self, writer, ttFont):
self.metrics.toXML(writer, ttFont)
@@ -484,7 +484,7 @@
# Data that is bit aligned can be tricky to deal with. These classes implement
# helper functionality for dealing with the data and getting a particular row
# of bitwise data. Also helps implement fancy data export/import in XML.
-class BitAlignedBitmapMixin:
+class BitAlignedBitmapMixin(object):
def _getBitRange(self, row, bitDepth, metrics):
rowBits = (bitDepth * metrics.width)
@@ -572,7 +572,7 @@
# Save the image data with the bits going the correct way.
self.imageData = _reverseBytes(bytesjoin(map(bytechr, ordDataList)))
-class ByteAlignedBitmapMixin:
+class ByteAlignedBitmapMixin(object):
def _getByteRange(self, row, bitDepth, metrics):
rowBytes = (bitDepth * metrics.width + 7) // 8
diff --git a/Lib/fontTools/ttLib/tables/E_B_L_C_.py b/Lib/fontTools/ttLib/tables/E_B_L_C_.py
index b024a8a..1856fd7 100644
--- a/Lib/fontTools/ttLib/tables/E_B_L_C_.py
+++ b/Lib/fontTools/ttLib/tables/E_B_L_C_.py
@@ -222,7 +222,7 @@
assert self.strikes[strikeIndex] == None, "Duplicate strike EBLC indices."
self.strikes[strikeIndex] = curStrike
-class Strike:
+class Strike(object):
def __init__(self):
self.bitmapSizeTable = BitmapSizeTable()
@@ -255,7 +255,7 @@
self.indexSubTables.append(indexSubTable)
-class BitmapSizeTable:
+class BitmapSizeTable(object):
# Returns all the simple metric names that bitmap size table
# cares about in terms of XML creation.
@@ -296,7 +296,7 @@
print("Warning: unknown name '%s' being ignored in BitmapSizeTable." % name)
-class SbitLineMetrics:
+class SbitLineMetrics(object):
def toXML(self, name, writer, ttFont):
writer.begintag('sbitLineMetrics', [('direction', name)])
@@ -319,7 +319,7 @@
# Important information about the naming scheme. Used for identifying subtables.
_indexSubTableSubclassPrefix = 'eblc_index_sub_table_'
-class EblcIndexSubTable:
+class EblcIndexSubTable(object):
def __init__(self, data, ttFont):
self.data = data
@@ -424,7 +424,7 @@
dataFormat = '>'+formatStringForDataType
offsetDataSize = struct.calcsize(dataFormat)
- class OffsetArrayIndexSubTableMixin:
+ class OffsetArrayIndexSubTableMixin(object):
def decompile(self):
@@ -485,7 +485,7 @@
# A Mixin for functionality shared between the different kinds
# of fixed sized data handling. Both kinds have big metrics so
# that kind of special processing is also handled in this mixin.
-class FixedSizeIndexSubTableMixin:
+class FixedSizeIndexSubTableMixin(object):
def writeMetrics(self, writer, ttFont):
writer.simpletag('imageSize', value=self.imageSize)
diff --git a/Lib/fontTools/ttLib/tables/G_M_A_P_.py b/Lib/fontTools/ttLib/tables/G_M_A_P_.py
index 9d06f77..6e8b322 100644
--- a/Lib/fontTools/ttLib/tables/G_M_A_P_.py
+++ b/Lib/fontTools/ttLib/tables/G_M_A_P_.py
@@ -27,7 +27,7 @@
-class GMAPRecord:
+class GMAPRecord(object):
def __init__(self, uv = 0, cid = 0, gid = 0, ggid = 0, name = ""):
self.UV = uv
self.cid = cid
diff --git a/Lib/fontTools/ttLib/tables/M_E_T_A_.py b/Lib/fontTools/ttLib/tables/M_E_T_A_.py
index f6e004d..b4a1a49 100644
--- a/Lib/fontTools/ttLib/tables/M_E_T_A_.py
+++ b/Lib/fontTools/ttLib/tables/M_E_T_A_.py
@@ -184,7 +184,7 @@
setattr(self, name, safeEval(attrs["value"]))
-class GlyphRecord:
+class GlyphRecord(object):
def __init__(self):
self.glyphID = -1
self.nMetaEntry = -1
@@ -267,7 +267,7 @@
return string
-class StringRecord:
+class StringRecord(object):
def __init__(self):
self.labelID = -1
self.string = ""
diff --git a/Lib/fontTools/ttLib/tables/O_S_2f_2.py b/Lib/fontTools/ttLib/tables/O_S_2f_2.py
index 5040d65..f678c17 100644
--- a/Lib/fontTools/ttLib/tables/O_S_2f_2.py
+++ b/Lib/fontTools/ttLib/tables/O_S_2f_2.py
@@ -21,7 +21,7 @@
bXHeight: B
"""
-class Panose:
+class Panose(object):
def toXML(self, writer, ttFont):
formatstring, names, fixes = sstruct.getformat(panoseFormat)
diff --git a/Lib/fontTools/ttLib/tables/S_V_G_.py b/Lib/fontTools/ttLib/tables/S_V_G_.py
index b7df032..c40768f 100644
--- a/Lib/fontTools/ttLib/tables/S_V_G_.py
+++ b/Lib/fontTools/ttLib/tables/S_V_G_.py
@@ -307,7 +307,7 @@
else:
print("Unknown", name, content)
-class DocumentIndexEntry:
+class DocumentIndexEntry(object):
def __init__(self):
self.startGlyphID = None # USHORT
self.endGlyphID = None # USHORT
@@ -317,7 +317,7 @@
def __repr__(self):
return "startGlyphID: %s, endGlyphID: %s, svgDocOffset: %s, svgDocLength: %s" % (self.startGlyphID, self.endGlyphID, self.svgDocOffset, self.svgDocLength)
-class ColorPalettes:
+class ColorPalettes(object):
def __init__(self):
self.numColorParams = None # USHORT
self.colorParamUINameIDs = [] # list of name table name ID values that provide UI description of each color palette.
@@ -343,7 +343,7 @@
if len(colorPalette.paletteColors) != self.numColorParams:
raise ValueError("Number of color records in a colorPalette ('%s') does not match the number of colorParamUINameIDs elements ('%s')." % (len(colorPalette.paletteColors), self.numColorParams))
-class ColorPalette:
+class ColorPalette(object):
def __init__(self):
self.uiNameID = None # USHORT. name table ID that describes user interface strings associated with this color palette.
self.paletteColors = [] # list of ColorRecords
@@ -362,7 +362,7 @@
colorRecord.blue = eval(attrib["blue"])
colorRecord.alpha = eval(attrib["alpha"])
-class ColorRecord:
+class ColorRecord(object):
def __init__(self):
self.red = 255 # all are one byte values.
self.green = 255
diff --git a/Lib/fontTools/ttLib/tables/V_O_R_G_.py b/Lib/fontTools/ttLib/tables/V_O_R_G_.py
index 1cfb02e..5f29eb1 100644
--- a/Lib/fontTools/ttLib/tables/V_O_R_G_.py
+++ b/Lib/fontTools/ttLib/tables/V_O_R_G_.py
@@ -115,7 +115,7 @@
elif glyphSelector in self.VOriginRecords:
del self.VOriginRecords[glyphSelector]
-class VOriginRecord:
+class VOriginRecord(object):
def __init__(self, name = None, vOrigin = None):
self.glyphName = name
diff --git a/Lib/fontTools/ttLib/tables/_c_m_a_p.py b/Lib/fontTools/ttLib/tables/_c_m_a_p.py
index 8c7ac4d..b08c1ff 100644
--- a/Lib/fontTools/ttLib/tables/_c_m_a_p.py
+++ b/Lib/fontTools/ttLib/tables/_c_m_a_p.py
@@ -97,7 +97,7 @@
self.tables.append(table)
-class CmapSubtable:
+class CmapSubtable(object):
def __init__(self, format):
self.format = format
@@ -217,7 +217,7 @@
subHeaderFormat = ">HHhH"
-class SubHeader:
+class SubHeader(object):
def __init__(self):
self.firstCode = None
self.entryCount = None
diff --git a/Lib/fontTools/ttLib/tables/_g_l_y_f.py b/Lib/fontTools/ttLib/tables/_g_l_y_f.py
index f1066c3..c0d9220 100644
--- a/Lib/fontTools/ttLib/tables/_g_l_y_f.py
+++ b/Lib/fontTools/ttLib/tables/_g_l_y_f.py
@@ -203,7 +203,7 @@
UNSCALED_COMPONENT_OFFSET = 0x1000 # composite designed not to have the component offset scaled (designed for MS)
-class Glyph:
+class Glyph(object):
def __init__(self, data=""):
if not data:
@@ -730,7 +730,7 @@
return self.__dict__ == other.__dict__
-class GlyphComponent:
+class GlyphComponent(object):
def __init__(self):
pass
@@ -890,7 +890,7 @@
raise TypeError("unordered types %s() < %s()", type(self), type(other))
return self.__dict__ == other.__dict__
-class GlyphCoordinates:
+class GlyphCoordinates(object):
def __init__(self, iterable=[]):
self._a = array.array("h")
diff --git a/Lib/fontTools/ttLib/tables/_k_e_r_n.py b/Lib/fontTools/ttLib/tables/_k_e_r_n.py
index 9c56762..50f306f 100644
--- a/Lib/fontTools/ttLib/tables/_k_e_r_n.py
+++ b/Lib/fontTools/ttLib/tables/_k_e_r_n.py
@@ -84,7 +84,7 @@
subtable.fromXML(name, attrs, content, ttFont)
-class KernTable_format_0:
+class KernTable_format_0(object):
def decompile(self, data, ttFont):
version, length, coverage = (0,0,0)
@@ -162,7 +162,7 @@
del self.kernTable[pair]
-class KernTable_format_2:
+class KernTable_format_2(object):
def decompile(self, data, ttFont):
self.data = data
@@ -181,7 +181,7 @@
self.decompile(readHex(content), ttFont)
-class KernTable_format_unkown:
+class KernTable_format_unkown(object):
def __init__(self, format):
self.format = format
diff --git a/Lib/fontTools/ttLib/tables/_n_a_m_e.py b/Lib/fontTools/ttLib/tables/_n_a_m_e.py
index dad85b9..b6cc19b 100644
--- a/Lib/fontTools/ttLib/tables/_n_a_m_e.py
+++ b/Lib/fontTools/ttLib/tables/_n_a_m_e.py
@@ -88,7 +88,7 @@
return None # not found
-class NameRecord:
+class NameRecord(object):
def toXML(self, writer, ttFont):
writer.begintag("namerecord", [
diff --git a/Lib/fontTools/ttLib/tables/otBase.py b/Lib/fontTools/ttLib/tables/otBase.py
index e617938..bf010b5 100644
--- a/Lib/fontTools/ttLib/tables/otBase.py
+++ b/Lib/fontTools/ttLib/tables/otBase.py
@@ -3,7 +3,7 @@
from .DefaultTable import DefaultTable
import struct
-class OverflowErrorRecord:
+class OverflowErrorRecord(object):
def __init__(self, overflowTuple):
self.tableType = overflowTuple[0]
self.LookupListIndex = overflowTuple[1]
@@ -32,7 +32,7 @@
def decompile(self, data, font):
from . import otTables
cachingStats = None if True else {}
- class GlobalState:
+ class GlobalState(object):
def __init__(self, tableType, cachingStats):
self.tableType = tableType
self.cachingStats = cachingStats
@@ -73,7 +73,7 @@
If a lookup subtable overflows an offset, we have to start all over.
"""
- class GlobalState:
+ class GlobalState(object):
def __init__(self, tableType):
self.tableType = tableType
globalState = GlobalState(tableType=self.tableTag)
@@ -468,7 +468,7 @@
return OverflowErrorRecord( (self.globalState.tableType, LookupListIndex, SubTableIndex, itemName, itemIndex) )
-class CountReference:
+class CountReference(object):
"""A reference to a Count value, not a count of references."""
def __init__(self, table, name):
self.table = table
@@ -740,7 +740,7 @@
valueRecordFormatDict = _buildDict()
-class ValueRecordFactory:
+class ValueRecordFactory(object):
"""Given a format code, this object convert ValueRecords."""
@@ -788,7 +788,7 @@
writer.writeUShort(value)
-class ValueRecord:
+class ValueRecord(object):
# see ValueRecordFactory
diff --git a/Lib/fontTools/ttLib/tables/ttProgram.py b/Lib/fontTools/ttLib/tables/ttProgram.py
index cfc9d71..156e4a2 100644
--- a/Lib/fontTools/ttLib/tables/ttProgram.py
+++ b/Lib/fontTools/ttLib/tables/ttProgram.py
@@ -200,7 +200,7 @@
return newPos
-class Program:
+class Program(object):
def __init__(self):
pass
diff --git a/Lib/fontTools/ttx.py b/Lib/fontTools/ttx.py
index a99ee9a..ae3c115 100644
--- a/Lib/fontTools/ttx.py
+++ b/Lib/fontTools/ttx.py
@@ -100,7 +100,7 @@
return output
-class Options:
+class Options(object):
listTables = False
outputDir = None
diff --git a/Lib/fontTools/unicode.py b/Lib/fontTools/unicode.py
index 669d497..ef61b01 100644
--- a/Lib/fontTools/unicode.py
+++ b/Lib/fontTools/unicode.py
@@ -24471,7 +24471,7 @@
return unicodes
-class _Unicode:
+class _Unicode(object):
def __init__(self):
self.codes = _makeunicodes()