def METHOD_NAME(self, title=None, font=None):
    if title is None:
        title = self.tr("Kerning")
    if font is not None:
        title = "{} – {} {}".format(
            title, font.info.familyName, font.info.styleName
        )
    self.setWindowTitle(title)