SDWebImageSVGCoder icon indicating copy to clipboard operation
SDWebImageSVGCoder copied to clipboard

Off centre when using text-anchor=middle

Open singpolyma opened this issue 6 months ago • 0 comments

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="15" height="15" viewBox="0 0 15 15">
  <rect style="fill:#ff0000;" width="15" height="15" x="0" y="0" />
  <text style="fill:#ffffff;font-size:8px;font-family:sans-serif;" text-anchor="middle" x="7.5" y="10">A</text>
</svg>

this looks right in browsers and other platform native renders, but with this is shows the text as off-center a bit, and a different amount off depending on the letter used.

singpolyma avatar Jul 02 '25 19:07 singpolyma