def ellipse(svg, node, font_size):
    """Draw ellipse tag."""
    rx, ry = svg.point(node.get('rx'), node.get('ry'), font_size)
    if not rx or not ry:
        return
    ratio_x = rx / sqrt(pi)
    ratio_y = ry / sqrt(pi)
    cx, cy = svg.point(node.get('cx'), node.get('cy'), font_size)

    svg.stream.move_to(cx + rx, cy)
    svg.stream.curve_to(
        cx + rx, cy + ratio_y, cx + ratio_x, cy + ry, cx, cy + ry)
    svg.stream.curve_to(
        cx - ratio_x, cy + ry, cx - rx, cy + ratio_y, cx - rx, cy)
    svg.stream.curve_to(
        cx - rx, cy - ratio_y, cx - ratio_x, cy - ry, cx, cy - ry)
    svg.stream.curve_to(
        cx + ratio_x, cy - ry, cx + rx, cy - ratio_y, cx + rx, cy)
    svg.stream.close()
Draw ellipse tag.
weasyprint/svg/shapes.py