Skip to main content
marcZ89
Inspiring
March 4, 2019
Answered

Is it possible to shift a character horizontally?

  • March 4, 2019
  • 2 replies
  • 1405 views

Hi everyone,


I'm able to shift the position of a specific character vertically using "baseline shift", however, after looking at all character properties, it seems there is no way to shift a character in a string horizontally, isn't it?

Edit: Seems like I found a way using the "kerning" or the "tracking" to adjust the position between 2 specific characters but I don't think its the best way to do it, there's should something like baseline shift for horizontal shifting..

Thanks!

This topic has been closed for replies.
Correct answer Disposition_Dev

kerning and tracking ARE the horizontal equivalent of baseline shift. tracking is the space between each letter in a textFrame, and kerning is the space between two individual letters.

Why do you think these are not the best solution? These parameters are designed specifically for shifting a letter(s) horizontally and you admitted they do what you are looking for.. I'm confused..

2 replies

Disposition_Dev
Disposition_DevCorrect answer
Legend
March 6, 2019

kerning and tracking ARE the horizontal equivalent of baseline shift. tracking is the space between each letter in a textFrame, and kerning is the space between two individual letters.

Why do you think these are not the best solution? These parameters are designed specifically for shifting a letter(s) horizontally and you admitted they do what you are looking for.. I'm confused..

marcZ89
marcZ89Author
Inspiring
March 7, 2019

I was hopping to maybe find something like "x position"... but yes this is what I ended up using (kerning) and it worked great!

Thanks!

Ten A
Community Expert
Community Expert
March 4, 2019

The Character class has a baselineShift property. Try below.

app.activeDocument.textFrames[0].characters[0].baselineShift = 10;

marcZ89
marcZ89Author
Inspiring
March 4, 2019

Unfortunately, this only shift the character up or down, not right or left

CarlosCanto
Community Expert
Community Expert
March 5, 2019

can you show an example of what you want to accomplish?