def render_font(font, msg, color, center):
    """Return the rendered font surface and its rect centered on center."""
    msg = font.render(msg, 0, color)
    rect = msg.get_rect(center=center)
    return msg, rect