Closed liamjt95 closed 8 months ago
Looks like this was never implemented to me.
TextPath as a node was added in https://github.com/meyfa/php-svg/pull/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 https://github.com/meyfa/php-svg/issues/98.
For more discussion, also see: https://github.com/meyfa/php-svg/issues/10.
Voting to close this is a duplicate.
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!