You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create an SVG image that contains some curved text. Exporting my document as XML results in a successful SVG that looks correct.
<?xml version="1.0" encoding="utf-8"?>
<svgxmlns="http://www.w3.org/2000/svg"xmlns:xlink="http://www.w3.org/1999/xlink"width="236.05"height="78.86"viewBox="98.48 265.39 236.05 78.86"style="fill: none">
<pathd="M 99.97623748074814 266.88704311777553 C 119.74920068227658 314.6231990472097 166.33075715003895 345.74800000000005 218 345.74800000000005 C 269.66924284996105 345.74800000000005 316.2507993177234 314.62319904720965 336.0237625192519 266.8870431177755"id="text-path"style="fill: none; stroke: none"/>
<textx="0"y="0"style="fill: #04ADB2; font-size: 40; font-weight: 400; text-anchor: middle; ">
<!-- Problem is here, as 'textPath' is a child node of 'text' -->
<textPathhref="#text-path"style="text-anchor: 'middle';"startOffset="50%">Test Text</textPath>
</text>
</svg>
My issue is that I now want to export this to a PNG with some custom font files I have installed locally. When rasterizing my image, I cannot see that the SVGTextPath node is being rendered at all. Looking at the code, it seems there is no logic in either \SVG\Nodes\Texts\SVGText::rasterize to rasterize children or any logic in \SVG\Nodes\Texts\SVGTextPath::rasterize.
Just want to check if I am missing some implementation detail or whether rasterizing child text nodes/text path nodes has not been implemented yet (I'm aware this stuff is a work in progress!).
Thanks!
The text was updated successfully, but these errors were encountered:
TextPath as a node was added in #42 , however, as you noted, without rasterization.
I don't want to speak for @meyfa, however I don't suspect this will be added soon, unless someone is willing to raise a PR. Your best bet, if you really need this, is probably to rasterize with Gmagick/Imagick.. or.. even better.. help fixing #98.
Agreed, #10 covers all text elements, including <textPath>. Text rasterization is notoriously difficult with GD and placing text on paths even more so. Someone needs to dedicate some time to implement this - I'll gladly review PRs. Thanks for the opening this issue, but closing as a duplicate.
Thanks for your responses! Unfortunately, this was required for some paid client work, for which we had to find another workaround. If I'm ever back in this space I will look into raising a PR.
Description
I'm trying to create an SVG image that contains some curved text. Exporting my document as XML results in a successful SVG that looks correct.
My issue is that I now want to export this to a PNG with some custom font files I have installed locally. When rasterizing my image, I cannot see that the SVGTextPath node is being rendered at all. Looking at the code, it seems there is no logic in either
\SVG\Nodes\Texts\SVGText::rasterize
to rasterize children or any logic in\SVG\Nodes\Texts\SVGTextPath::rasterize
.Just want to check if I am missing some implementation detail or whether rasterizing child text nodes/text path nodes has not been implemented yet (I'm aware this stuff is a work in progress!).
Thanks!
The text was updated successfully, but these errors were encountered: