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

How to resize text layer without text transformation?

Community Beginner ,
Aug 24, 2020 Aug 24, 2020

Copy link to clipboard

Copied

I would like to resize the text layer using resize(..) api but this deforms the text. Is there any way to transform the text bounding box without transfroming text?

 

var textLayerRef = DummyGroup.artLayers.add();
textLayerRef.kind = LayerKind.TEXT;
var textItemRef = textLayerRef.textItem;
textItemRef.contents =  "Lorem Ipsum";
textItemRef.size = new UnitValue(14, "px");
textLayerRef.resize(200, 100, AnchorPosition.TOPLEFT); // This deforms the text
TOPICS
Actions and scripting

Views

251

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 ,
Aug 24, 2020 Aug 24, 2020

Copy link to clipboard

Copied

Why are you using resize set the font size you want. You may need to calculate what size you want to use.   I think I remember I had to save the resolution change the document resolution to 72 because Adobe fonts seem to be baste on points ie 72DPI I could them divide the document height in pixels  by the number of lines of text I want to fit over the canvas set the text layer font size.  Like( height /5) if  I wanted text to be 1/5 document height.  Them I could restore  the document resolution and the text size would be good. 

JJMack

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
Community Beginner ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

LATEST

I would like to create Paragraph Text layers using a script with a specific bounding box. The layer.bounds give me the tight bounding box instead of the values you see on the layer's properties window. I'll try to get the bounding box from transform, that should help.

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