def METHOD_NAME(self):
    editor_font = self.config.get("font_name")
    if editor_font == "":
        try:
            font = self.ui_widget.get_style_context().get_property(
                "font", Gtk.StateFlags.NORMAL)
            editor_font = font.to_string()
        except UnicodeError as e:
            log.warning("Using deprecated but still working font way (%r)",
                        e)
            font = self.ui_widget.get_style_context().get_font(
                Gtk.StateFlags.NORMAL)
            editor_font = font.to_string()
    return editor_font