def load_truetype_font(
    path: str, tile_width: int, tile_height: int
) -> Tileset:
    """Return a new Tileset from a `.ttf` or `.otf` file.

    Same as :any:`set_truetype_font`, but returns a :any:`Tileset` instead.
    You can send this Tileset to :any:`set_default`.

    This function is provisional.  The API may change.
    """
    if not os.path.exists(path):
        raise RuntimeError("File not found:\n\t%s" % (os.path.realpath(path),))
    return Tileset._claim(
        lib.TCOD_load_truetype_font_(path.encode(), tile_width, tile_height)
    )
def load_truetype_font ( path : str , tile_width : int , tile_height : int ) -> Tileset : if not os . path . exists ( path ) : raise RuntimeError ( "File not found:\n\t%s" % ( os . path . realpath ( path ) , ) ) return Tileset . _claim ( lib . TCOD_load_truetype_font_ ( path . encode ( ) , tile_width , tile_height ) )
Return a new Tileset from a `.ttf` or `.otf` file.

    Same as :any:`set_truetype_font`, but returns a :any:`Tileset` instead.
    You can send this Tileset to :any:`set_default`.

    This function is provisional.  The API may change.