add the generic getGlyphSet() API to T1Font as well.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@423 4cde692c-a291-49d1-8350-778aa11640f8
diff --git a/Lib/fontTools/t1Lib.py b/Lib/fontTools/t1Lib.py
index d487c07..bb8c9bd 100644
--- a/Lib/fontTools/t1Lib.py
+++ b/Lib/fontTools/t1Lib.py
@@ -63,6 +63,17 @@
# recreate the PS stream
return self.data
+ def getGlyphSet(self):
+ """Return a generic GlyphSet, which is a dict-like object
+ mapping glyph names to glyph objects. The returned glyph objects
+ have a .draw() method that supports the Pen protocol, and will
+ have an attribute named 'width', but only *after* the .draw() method
+ has been called.
+
+ In the case of Type 1, the GlyphSet is simply the CharStrings dict.
+ """
+ return self["CharStrings"]
+
def __getitem__(self, key):
if not hasattr(self, "font"):
self.parse()