def getFontMetrics(self): gc = GC(self.parentCanvas) metrics = gc.getFontMetrics() gc.dispose() return metrics