• 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 avoid overflow of TextFrame contents for different Font

Community Beginner ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

I'm facing the issue of text-overflow for TextFrame content in Indesign based on the font style 

For Ex:

If  I use the font ITC Avant Garde Gothic for the TextFrame content :

  • Jack
  • Tom 
  • Henry 
  • David
  • Steve

with the dedicated height and width for the text frame and if I use another font like Montserrat for the same TextFrame content, the content gets overflowed.

How can I overcome the issue using the script? (I don't want to change the Height and Width of the TextFrame for different Font Style)

TOPICS
Scripting

Views

627

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

correct answers 1 Correct answer

Community Expert , Jul 11, 2022 Jul 11, 2022

You don't need a script. Use Object Styles. But do it via script is: 

myTextFrame.textFramePreferences.firstBaselineOffset = FirstBaseline.CAP_HEIGHT;
myTextFrame.textFramePreferences.minimumFirstBaselineOffset = ".1 in";


Votes

Translate

Translate
Community Expert ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

You can determine if a specific frame is overset with: 

if (myFrame.overflows) {

//do stuff 

}

 

Question is: what do you want to do? Shrink the text, resize the frame, etc.?

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 ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

I want to shrink the text.

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 Expert ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

Change the First baseline offset for the text frame. If you use a fixed height then the first baseline will always be in the same place regardless of font.

Screenshot 2022-07-10 at 6.10.40 PM.png

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 ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

Hi, this is my doubt about using the font Montserrat, 

 

adobe.jpg

 

Here on the left side I have the screenshot of the INDESIGN Document and on the Right side, I have the screenshot of the Illustrator Document, here I have used the same font Montserrat Regular for both INDESIGN and ILLUSTRATOR in INDESIGN the text has started with some space above the content and in ILLUSTRATOR there is no space compared to INDESIGN. Is it possible to create the text without any space above in INDESIGN using script?

 

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 Expert ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

If you want the top of the capital letters to align with the top of the text frame then make the first baseline offset the Cap height.

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 ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

But in Illustrator I have not applied any baseline offset property,  is it possible to set without applying any property? 

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 Expert ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

Use an object style on the text frames and set the Object Style Text Frame Baseline Options to Cap Height, as Scott suggested. InDesign treats text differently than Illustrator. 

brianp311_0-1657558579573.png

 

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 ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

Can I set the first baseline offset as Cap Height and along with that the Min as 0.1in value using script?

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 ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

Why does the font take some space above the text in INDESIGN and not in ILLUSTRATOR?

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 Expert ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

Because the various baseline options in InDesign give you more control over typesetting than Illustrator, because InDesign is a typesetting program and Illustrator is not. 

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 ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

Can't we set it the same as Illustrator using script?

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 Expert ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

LATEST

You don't need a script. Use Object Styles. But do it via script is: 

myTextFrame.textFramePreferences.firstBaselineOffset = FirstBaseline.CAP_HEIGHT;
myTextFrame.textFramePreferences.minimumFirstBaselineOffset = ".1 in";


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