def linetoraster(m):
    """Convert a single line of text *m* to a raster image,
    by rendering it using the font in *font*.

    A triple of (*width*, *height*, *pixels*) is returned;
    *pixels* is in boxed row packed pixel format.
    """

    # Assumes monospaced font.
    x = 8 * len(m)
    y = 8
    return x, y, [itertools.chain(*row) for row in zip(*map(char, m))]
Convert a single line of text *m* to a raster image,
    by rendering it using the font in *font*.

    A triple of (*width*, *height*, *pixels*) is returned;
    *pixels* is in boxed row packed pixel format.