def METHOD_NAME(self, text, displayof=None):
    "Return text width"
    args = (text,)
    if displayof:
        args = ('-displayof', displayof, text)
    return int(self._call("font", "measure", self.name, *args))