def get_font(family, fallback=None):
font = QtGui.QFont(family)<EOL>font_info = QtGui.QFontInfo(font)<EOL>if fallback is not None and font_info.family() != family:<EOL><INDENT>font = QtGui.QFont(fallback)<EOL><DEDENT>return font<EOL>
Return a font of the requested family, using fallback as alternative.

    If a fallback is provided, it is used in case the requested family isn't
    found.  If no fallback is given, no alternative is chosen and Qt's internal
    algorithms may automatically choose a fallback font.

    Parameters
    ----------
    family : str
      A font name.
    fallback : str
      A font name.

    Returns
    -------
    font : QFont object