'Return text width'

def measure(self, text, displayof=None):

    args = (text,)
    if displayof:
        args = ('-displayof', displayof, text)
    return int(self._call('font', 'measure', self.name, *args))
