• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

script or workaround for changing text to right-justified without moving the text.

New Here ,
Jun 19, 2024 Jun 19, 2024

Copy link to clipboard

Copied

I'm working on a map with hundreds of labels, each associated with a point location, which are small circles.    Labels are positioned to the left of the circles, with the last letter touching the circle.  Client needs  to be be able to edit the text and/or it's point size.  Since the text is anchored on the left, this shifts the text away from or on top of its associated circle.  Result is utter confusion, labels losing their visual link to their circles.

These circles and labels are created in GIS software, which will only create left-justified text.  I export the GIS circles & labels to svg file and then open that in Illsutrator.  

So I'm looking for a workaround or script to reverse the justification en masse.   Process or script would be:

 

User manually selects some or all of the type on a single layer.

 

For each selected text object:
    if object is left-justified:
        get length of text
        change to right justified # (shifts text to the left)
        move text to the right by its length

 

Any help or suggestions are appreciated

 

TOPICS
How-to , Scripting , Type

Views

72

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jun 19, 2024 Jun 19, 2024

Copy link to clipboard

Copied

There are scripts that do it. For example here, provided by sky-chaser-high:

 

https://github.com/sky-chaser-high/adobe-illustrator-scripts?tab=readme-ov-file#textalign_centerjste...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 19, 2024 Jun 19, 2024

Copy link to clipboard

Copied

You don’t even need a script:

 

  1. Select > All
  2. Type > Convert to Area Type
  3. Ctrl-Shift R to right-align
  4. Type > Convert to Point Type

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 19, 2024 Jun 19, 2024

Copy link to clipboard

Copied

LATEST
Thank you so much! I'll try this today.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines