yWorks / svg2pdf.js

A javascript-only SVG to PDF conversion utility that runs in the browser. Brought to you by yWorks - the diagramming experts
MIT License
654 stars 101 forks source link

Support for textLength #69

Closed amarantedaniel closed 2 years ago

amarantedaniel commented 5 years ago

Hi,

Is there support for textLength property on texts and is it planned?

Thanks

HackbrettXXX commented 5 years ago

I suppose you mean the "stroke-width" attribute? This attribute is currently not supported for text elements, as well as the "stroke" attribute for setting the text stroke color.

We might implement these features in the next release.

amarantedaniel commented 5 years ago

Sorry @HackbrettXXX I added a completely wrong name, my bad. Updated now. This is what I'm talking about: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/textLength

HackbrettXXX commented 5 years ago

Ok, this not supported, as well. This feature seems to be harder to implement and it is unsure if there is a convenient way to reflect this in PDF. We are always happy about pull requests, though.

I'm opening a separate issue for text stroking support: #70.

amarantedaniel commented 5 years ago

ok, thanks for the quick response

HackbrettXXX commented 3 years ago

This might be possible to implement with the charSpace text option and the getTextDimensions method.

JobSoltero commented 2 years ago

Seems like this issue should be closed

HackbrettXXX commented 2 years ago

You are right, thanks.