in Sources/CollectionsBenchmark/Charts/Graphics/Graphics+SVG.swift [136:152]
func renderText(into xml: inout _XMLRenderer) {
xml.element(
name: "text",
context: .text,
attributes: [
"x": "\(text.boundingBox.minX.s)",
"y": "\((text.boundingBox.maxY - text.descender).s)",
"font-family": text.style.font.family,
"font-size": "\(text.style.font.size.s)",
"font-weight": text.style.font.isBold ? "bold" : "normal",
"font-style": text.style.font.isItalic ? "italic" : "normal",
"fill": text.style.color._svgString(),
"fill-opacity": "\(text.style.color.srgbComponents.alpha.s)"
]) { xml in
xml.text(text.string)
}
}