def text(buffer, string, font, x0=0, y0=0, color=(255, 255, 255), bgcolor=(
    0, 0, 0), colors=None):
    """Simultate write on an oled display.
    
    Parameters
    ----------
    buffer : oled handler object
        The first parameter.
    string : str
        The message to write.
    font : str
        sss
    x0 : int
        X possition.
    y0 : int
        Y possition.
    color : tuple
        h
    bgcolor : tuple
        h
    colors : tuple
        h

    """
    if colors is None:
        colors = color, color, bgcolor, bgcolor
    x = x0
    for c in string:
        if not ord(c) in font.keys():
            c = '?'
        row = y0
        _w, *_font = font[ord(c)]
        for byte in _font:
            unsalted = byte
            for col in range(x, x + _w):
                color = colors[unsalted & 3]
                if color is not None:
                    buffer.pixel(col, row, color)
                unsalted >>= 2
            row += 1
        x += _w
