Created a new library directory called "FreeLib". All OpenSource RFMKII components will reside there, fontTools being the flagship.


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@2 4cde692c-a291-49d1-8350-778aa11640f8
diff --git a/Lib/fontTools/ttLib/tables/DefaultTable.py b/Lib/fontTools/ttLib/tables/DefaultTable.py
new file mode 100644
index 0000000..745f237
--- /dev/null
+++ b/Lib/fontTools/ttLib/tables/DefaultTable.py
@@ -0,0 +1,36 @@
+import string
+import sys
+
+class DefaultTable:
+	
+	dependencies = []
+	
+	def __init__(self, tag):
+		self.tableTag = tag
+	
+	def decompile(self, data, ttFont):
+		self.data = data
+	
+	def compile(self, ttFont):
+		return self.data
+	
+	def toXML(self, writer, ttFont):
+		writer.begintag("hexdata")
+		writer.newline()
+		writer.dumphex(self.compile(ttFont))
+		writer.endtag("hexdata")
+		writer.newline()
+	
+	def fromXML(self, (name, attrs, content), ttFont):
+		from fontTools.misc.textTools import readHex
+		from fontTools import ttLib
+		if name <> "hexdata":
+			raise ttLib.TTLibError, "can't handle '%s' element" % name
+		self.decompile(readHex(content), ttFont)
+	
+	def __repr__(self):
+		return "<'%s' table at %x>" % (self.tableTag, id(self))
+	
+	def __cmp__(self, other):
+		return cmp(self.__dict__, other.__dict__)
+