eg:
Demo
The effect of using the mouse to select text is as follows:
enter image description here
As you can see, there’s a gap.
I have tried setting lengthAdjust=”spacingAndGlyphs”, but this causes other problems.
Additional notes:
In my project, I need to underline what the user has selected, Set lengthAdjust = "spacingAndGlyphs"
causes window.getSelection.getRangeAt(0).getClientRects()
is not accurate. This results in an inaccurate underline range
enter image description here
I want to know the effect of ‘lengthAdjust’ on text selection In SVG Text.
It would be great if we could solve this problem.
YuLiang.Chen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.