JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1"
viewBox="0 0 650 480"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill-opacity="0.8"
font-family="monospace"
font-size="25">
<title>SVG Text Chunks</title>
<desc>
Johannes Kalliauer posed some interesting SVG text chunk questions on his Wikimedia Commons talk page in July 2018.
Chrome and Firefox generally agree with the expected result except when they take an implied coordinate.
Chrome and Firefox use the virtual x,y position rather than the actual x,y position.
In other words, they assume the text is rendered with text-anchor:start from the text chunk's anchor point,
and they do not adjust the coordinates for text-anchor:middle or text-anchor:end.
For example, the ending position of a text-anchor:end should always be the anchor point.
The issue is what current text position means.
Does it mean the actual position where the glyph is painted.
Or does it mean a virtual position that will be adjusted for text-anchor and its ilk.
https://www.w3.org/TR/SVG/text.html#TextLayout mentions that the current text position is adjusted by text-anchor.
https://www.w3.org/TR/SVG/text.html#CurrentTextPosition does not mention text-anchor.
Edge apparently does not start a new text chunk when there is an absolute y change.
</desc>
<metadata>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:date>2018-08-01</dc:date>
<dc:source rdf:resource="https://commons.wikimedia.org/wiki/User_talk:JoKalliauer#Is_this_a_known_bug?"/>
<cc:license...