Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rotateTextToMatchPathSegmentAngle #11

Open
creold opened this issue Jan 28, 2025 · 2 comments
Open

rotateTextToMatchPathSegmentAngle #11

creold opened this issue Jan 28, 2025 · 2 comments

Comments

@creold
Copy link

creold commented Jan 28, 2025

The script is good. I like that you can select two points on different paths and rotate the text along the virtual line. Only it doesn't define the selected segment of a path if the user hasn't selected anchor points.

Toshiyuki TAKAHASHI has a script that can define a mouse-selected segment of a path without the user selecting the segment's endpoints
https://github.com/gau/adjust-text-angle-to-segment. This would be a good addition to your script.

Image

@creold
Copy link
Author

creold commented Jan 28, 2025

I would also add a rotation from the anchor point of the text, getting the key from the justification property

var rotateAbout = text.textRange.justification.toString().split('.')[1];
text.rotate(deg, undefined, undefined, undefined, undefined, Transformation[rotateAbout]);

Image

@sky-chaser-high
Copy link
Owner

Hi Sergey.
Thanks for the suggestion. I'll consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants