we can get the react and position via SVGTextContentElement.getExtentOfChar(index)
but how to get the style of any inside typographic character
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 400 200" width="400" height="200" >
<rect width="100%" height="100%" fill="gray"/>
<g style="text-align:center;text-anchor:middle;stroke:none;stroke-width:0;" transform="translate(100 100)">
<path style="fill:none;" stroke-width="1" stroke="blue"
d="m 0,72 c 32,-16 52,-20 80,-20 28,0 48,4 80,20" transform="translate(0,-50)"
id="path-upper" />
<text style="font-size:9px;" xml:space="preserve" id="t">
<textPath xlink:href="#path-upper" startOffset="50%" >
<tspan x="0" dy="15" style="fill:red" id="outSpan">
abcd
<tspan id="inSpan" style="fill:blue">efgh</tspan>
</tspan>
</textPath>
</text>
</g>
</svg>
document.querySelector("#outSpan").getExtentOfChar(2)
outside tspan can get the position of character, which is in the inside tspan.
i need also get the style of one character by index too.
like the get the style of "e" in "efgh" in the snippet code
does "getComputedStyle" can help?
Call getComputedStyle e.g.