Skip to main content
othmanqw12
Participant
November 10, 2025
Question

UXP text normalization issue, Transformed text layers lose visual size and position

  • November 10, 2025
  • 1 reply
  • 75 views

Hello Adobe,

I’m developing a UXP plugin that normalizes transformed text layers (similar to Free Transform → Apply behavior). The goal is to recreate the text layer cleanly with the same visual appearance — same text, font, color, and point size, but without transformation.

While this works perfectly using ExtendScript (JSX), in UXP the results are inconsistent:

  • The new text appears much smaller than the original when the source layer was a paragraph text (area text).

  • Multiple new layers are created at random positions far from the original location.

  • The effective visual font size calculation based on boundsNoEffects vs. a clean text layer width seems unreliable in UXP.

It appears that UXP’s text creation and measurement APIs (batchPlay, bounds, textKey.textShape) handle paragraph text differently than JSX, breaking proportional scaling and position tracking.

Could you please investigate or confirm if this is a known limitation of the UXP Photoshop API?
We need consistent behavior between JSX text measurement and UXP’s batchPlay bounds for accurate size normalization.

Thank you for your time and for improving UXP stability for text-based plugins.


Othman Ahmed Akram
(Developer of Kashida Pro / Arabic Typography Tools)

1 reply

Community Manager
November 11, 2025

Hello, Othman.  I appreciate your aim with your plugin.  Transformations on text layers is not a good situation.  We definitely do want the UXP API to be able to do as much and more than ExtendScript.

I would say this was not a known issue with the text layer handling in the UXP Ps API.  If you can provide a simple example of a transformed text layer, the code that works in ExtendScript, and what should be the equivalent call in UXP, I can log a fully-prepared bug.

 

Thanks, Sam.

othmanqw12
Participant
November 14, 2025

Thank you so much for your response and willingness to help! I really appreciate your time.

To provide a bit more context: I am developing a tool called Kashida Pro, which is aimed at solving one of the biggest challenges in Arabic typography, the application of kashida (Arabic justification/stretching) according to proper Arabic rules. This is a significant improvement over Adobe’s current Middle Eastern Text Engine (Tatweel), and it’s especially useful for Arabic communities.

The tool is working 100% perfectly in CEP (Common Extensibility Platform) as an Illustrator extension or as simple jsx script. Even if I manually change the text size or scale the text, Kashida applies perfectly without issues.

However, in my UXP Photoshop version, I’ve implemented the same core idea, with adjustments to match UXP’s functionality. The tool works well, but here’s the problem:

When I scale the text or use Free Transform in Photoshop, and then apply Kashida, it starts to collapse or grow uncontrollably. If I manually adjust the font size via the Character panel, it works fine, but this behavior only occurs when scaling or transforming the text.

The same logic works perfectly in ExtendScript (.jsx) without issues, even with scaling, so this is a problem specifically related to UXP and its handling of transformed text layers.

Screen record:

https://drive.google.com/file/d/15MkZWXlE1adk-K2mrS30coKGjiCw1Ov6/view?usp=sharing
Here is the jsx script that works:

https://drive.google.com/file/d/1XtM3QrbidqrNkdf8p7Q9Nu-ifz38h9s4/view?usp=sharing

 

I’ve attached a drive link screen record for the issue of both the UXP tool and the JSX version for comparison.

So I believe the real problem arises due to a limitation in Photoshop’s UXP API, not a flaw in my code. Cuz When I apply Free Transform to a text layer and then use Kashida, the bounds (and the resulting visual width calculation) include the scaled transform, leading to unpredictable behavior, such as the text collapsing or growing too much. This issue does not occur in ExtendScript, as it handles bounds differently, giving a proper separation between the transform and the actual content size.

I think the API does not provide a clear way to differentiate between the visual size of a transformed text layer and its original size, which causes the issue when applying Kashida.

I’m hoping this helps clarify the situation. If I’m wrong please correct me


I’d love your insights or any suggestions on how to resolve this issue in UXP.If would you like to see my code, I will be thankful for your helping.