Quantcast
Channel: User spraff - Stack Overflow
Viewing all articles
Browse latest Browse all 55

Why is text not showing along this svg textPath?

$
0
0

Similarly to this I am trying to render svg text such that it fits into a given space (auto sized, I do not give font size explicitly).

Here is my test image

<?xml version="1.0" encoding="UTF-8"?><svg      xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 2 2" width="200" height="200"      xmlns:xlink="http://www.w3.org/1999/xlink"><g fill="black"><polygon points="1.0,0.0 -0.4999999999999998,0.8660254037844387 -0.5000000000000004,-0.8660254037844384"></polygon></g><g fill="red"><polygon points="0.94,0.0 -0.46999999999999975,0.8140638795573724 -0.4700000000000004,-0.814063879557372"></polygon></g><polygon fill="orange" points="0.94,0.0 0.614374448177051,0.18800000000000003 0.6143744481770509,-0.18799999999999994"></polygon><polygon fill="orange" points="-0.46999999999999975,0.8140638795573724 -0.4699999999999999,0.43806387955737236 -0.14437444817705086,0.6260638795573723"></polygon><polygon fill="orange" points="-0.4700000000000004,-0.814063879557372 -0.14437444817705136,-0.6260638795573721 -0.47000000000000025,-0.438063879557372"></polygon><circle fill="green" cx="0" cy="0" r="0.47"></circle><circle fill="blue" cx="0" cy="0" r="0.37"></circle><path id="text_path_XQjkCgSWaBUILYrAVcMt" fill="white" stroke="red" stroke-width="0.01" d="M0,0 L0.5,0.5"></path><text><textPath xlink:href="#text_path_XQjkCgSWaBUILYrAVcMt" method="stretch" lengthAdjust="spacingAndGlyphs">look at me</textPath></text></svg>

The <path> renders in the expected position, but I don't see look at me rendered along that line or anywhere else.

What is wrong with my <textPath>?


Viewing all articles
Browse latest Browse all 55

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>