MarginPen now pays attention to the transformation set for components.

git-svn-id: http://svn.robofab.com/trunk@92 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
This commit is contained in:
Erik van Blokland 2008-07-28 23:21:29 +00:00
parent 6083cfc404
commit 04e27a3cca

View File

@ -77,12 +77,14 @@ class MarginPen(BasePen):
self.currentPt = None
def addComponent(self, baseGlyph, transformation):
from fontTools.pens.transformPen import TransformPen
if self.glyphSet is None:
return
if baseGlyph in self.glyphSet:
glyph = self.glyphSet[baseGlyph]
if glyph is not None:
glyph.draw(self)
tPen = TransformPen(self, transformation)
glyph.draw(tPen)
def getMargins(self):
"""Get the horizontal margins for all contours combined, i.e. the whole glyph."""