Sg2.9
help with modifying a type sc...
Recent RSS
help with modifying a type script
From:  Chris49
Date:  29. June 2012, 18:57

Hello, I have an Illustrator script that takes text on a path and turns it into point type. I'd like to modify the script so that it works on text on a path when the text is not fully expanded or can't fit on the length of the path (ie when it shows the little red plus symbol) and also so that it also keeps the orientation of the type (ie so that it stays at the same angle and position on the artboard).

Here is a link to the script I'd like to modify: http://kelsocartography.com/scripts/scripts/nvkelso/DetachTextFromPath.jsx

And here is another type script that converts area type to point type while keeping the orientation of the text:
http://kelsocartography.com/scripts/scripts/nvkelso/MakePointType_v3.jsx

Any help or suggestions would be greatly appreciated.

thanks,

  • Chris
Re: help with modifying a type script
From:  pqbd
Date:  29. June 2012, 20:50

Here's a quick function that will convert AreaText and PathText to PointText while preserving orientation. Just select all AreaText and PathText items you'd like to convert, then run the script.

It assumes a couple of details, like left-justification, but it should get you going in the right direction.

Re: help with modifying a type script
From:  Chris49
Date:  10. July 2012, 18:35

thanks pqbd, I will give it a go!

Re: help with modifying a type script
From:  Chris49
Date:  10. July 2012, 19:41

just tried the script out and got this error message in the console:

TypeError: Cannot read property "bounds" from null
at Scriptographer Scripts/areatopoint.js:26
at Scriptographer Scripts/areatopoint.js:8

Re: help with modifying a type script
From:  pqbd
Date:  10. July 2012, 23:12

Hmm. There's no error-checking in the code, so that's not entirely a surprise. Have you tried it on a new document containing only an Area Text object?

If it still doesn't work, try changing line 26 to:

var vector = points.children[0].bounds.center-points.children[1].bounds.center;

Re: help with modifying a type script
From:  Chris49
Date:  11. July 2012, 00:09

It seems like the script works fine with area text that isn't rotated. Another problem is if the text is stacked within an area type box to keep it stacked in the same position when it is converted to point text.

Text on a path is a different issue altogether. It would be ideal to keep the orientation and position/ vector angle of the text while either expanding the path to fit overflowing text, or to make the text on a path into multiple separate point text that inherits the same angle / position of it's parent by word (not sure if that's possible).

In both scenarios I'm looking for the converted text to inherit it's parent's font and layer. (I'm working with files that contain about 20 separate layers for different styles of type).

I did modify the script so that it first selects anything that is a text object and isn't empty.

Any ideas from here? I assume writing a separate function for text on a path would be another starting point?

thanks for the help!

Re: help with modifying a type script
From:  pqbd
Date:  11. July 2012, 00:36

Without seeing what kind of type-formatting issues you're having, I'm not sure what you mean by 'stacked' or 'expanding the path'.

If you supply a sample file, I could probably give you a more direct help, but it seems like you get the idea.

Re: help with modifying a type script
From:  Chris49
Date:  11. July 2012, 01:30

Here is an .ai file with some sample type.

The main issue is that I'd like for the modified type's individual words to keep their position and orientation, as well as to stay within assigned layers and retain the same font.

thanks again,

  • chris
Re: help with modifying a type script
From:  pqbd
Date:  11. July 2012, 01:57

The file is garbage - there's only an empty text object.

Re: help with modifying a type script
From:  Chris49
Date:  11. July 2012, 20:34

that's odd, maybe it was corrupted during the upload? Here's one more, I could also dropbox it to you.

Re: help with modifying a type script
From:  pqbd
Date:  11. July 2012, 20:37

Try compressing it to a zip file and sending to: pxqxbxd_at_gmail.com

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Gearwheels 18.08.08