def txt2im(txt, outfn, cfg=None, show=False):
    cfg = makeConfig(cfg)
    font = getFontForPyGame(cfg['font-family'], cfg['font-size'])
    title_font = getFontForPyGame(cfg['font-family'], cfg['title-font-size'])
    data = makeMatrix(txt, font, title_font, cfg)
    im = makeImage(data, cfg)
    im.save(outfn)
    if ((os.name == 'nt') and show):
        im.show()
def txt2im(txt, outfn, cfg=None, show=False):
    cfg = makeConfig(cfg)
    font = getFontForPyGame(cfg['font-family'], cfg['font-size'])
    title_font = getFontForPyGame(cfg['font-family'], cfg['title-font-size'])
    data = makeMatrix(txt, font, title_font, cfg)
    im = makeImage(data, cfg)
    im.save(outfn)
    if ((os.name == 'nt') and show):
        im.show()