Highlighted

Is there any way to scale a background text box by a percentage of the x-height?

New Here ,
May 14, 2020

Copy link to clipboard

Copied

Hi All, is there any way to set an object style or other element on a paragraph style so that the height scales as the x height of the font increases or decreases? The background colour also needs the opacity to be modified. Please see images. Screen Shot 2020-05-14 at 9.13.57 pm.pngScreen Shot 2020-05-14 at 9.20.19 pm.png

See picturesScreen Shot 2020-05-14 at 9.21.55 pm.png

Many thanks 

Adobe Community Professional
Correct answer by Laubender | Adobe Community Professional

FWIW:
If you work always with the same font you could do it with a single text frame. The contents will be of three paragraphs.

You need three paragraph styles that use the next style feature. So you can wrap all the properties needed into one object style that use also Next Style enabled. Auto height is enabled as well:

 

AutoHeight-OneFrameSolution-DependentOnFont-1.PNG

 

 

Different point size below. Style-Middle is based on Style-Top. Style-Bottom is based in Style-Middle.

Style-Top and Style-Middle have 66% Auto Leading applied. Style-Bottom has 44% Auto Leading applied.

First baseline of the text frame is set to x-Height:

 

AutoHeight-OneFrameSolution-DependentOnFont-2.PNG

 

However, if you change the font you have to adapt the paragraph styles' auto leading values.

 

No need to adapt the styles if you just change the point size of the font, because I did all three paragraph styles with the same font size but with different auto leading values. With the solution that has the three text frames that is not needed. You can freely change the font or font size and the overall height will adapt.

 

Regards,
Uwe Laubender

( ACP )

TOPICS
Feature request, Type

Views

589

Likes

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

Is there any way to scale a background text box by a percentage of the x-height?

New Here ,
May 14, 2020

Copy link to clipboard

Copied

Hi All, is there any way to set an object style or other element on a paragraph style so that the height scales as the x height of the font increases or decreases? The background colour also needs the opacity to be modified. Please see images. Screen Shot 2020-05-14 at 9.13.57 pm.pngScreen Shot 2020-05-14 at 9.20.19 pm.png

See picturesScreen Shot 2020-05-14 at 9.21.55 pm.png

Many thanks 

Adobe Community Professional
Correct answer by Laubender | Adobe Community Professional

FWIW:
If you work always with the same font you could do it with a single text frame. The contents will be of three paragraphs.

You need three paragraph styles that use the next style feature. So you can wrap all the properties needed into one object style that use also Next Style enabled. Auto height is enabled as well:

 

AutoHeight-OneFrameSolution-DependentOnFont-1.PNG

 

 

Different point size below. Style-Middle is based on Style-Top. Style-Bottom is based in Style-Middle.

Style-Top and Style-Middle have 66% Auto Leading applied. Style-Bottom has 44% Auto Leading applied.

First baseline of the text frame is set to x-Height:

 

AutoHeight-OneFrameSolution-DependentOnFont-2.PNG

 

However, if you change the font you have to adapt the paragraph styles' auto leading values.

 

No need to adapt the styles if you just change the point size of the font, because I did all three paragraph styles with the same font size but with different auto leading values. With the solution that has the three text frames that is not needed. You can freely change the font or font size and the overall height will adapt.

 

Regards,
Uwe Laubender

( ACP )

TOPICS
Feature request, Type

Views

590

Likes

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
May 14, 2020 0
Adobe Community Professional ,
May 14, 2020

Copy link to clipboard

Copied

That cannot be done in the InDesign interface. It may be able to be done with scripting, but I'm not a scripter so I can't tell you for sure.

Likes

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
Reply
Loading...
May 14, 2020 0
New Here ,
May 14, 2020

Copy link to clipboard

Copied

Thanks heaps. 

B

Likes

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
Reply
Loading...
May 14, 2020 0
Adobe Community Professional ,
May 14, 2020

Copy link to clipboard

Copied

Hi B-2,

if the relation between x-height and EM-space would be all the same for every font we could do this with a single text frame.

But that's not possible. That's a font designer's decision and would vary from font to font.

 

What is working:
If you do this with a group of three text frames.

All have text wrap applied, all are set to auto height:

 

AutoHeight-xHeight-plus-CapHeight-plus-xHeight.PNG

 

First baseline of the frame on top is: x-Height

First baseline of the frame in the middle is: Cap-Height

Bottom frame's fill color is the color you want.

 

AutoHeight-xHeight-plus-CapHeight-plus-xHeight-2.PNG

You could group all three together and assign a mutual paragraph style.

The contents of the top and the bottom frame should be one single white space character:

 

AutoHeight-xHeight-plus-CapHeight-plus-xHeight-3.PNG

 

You could assign different paragraph styles to that group of text frames or you could change the properties of the assigned paragraph style. The overall height of the group will always adapt:

AutoHeight-xHeight-plus-CapHeight-plus-xHeight-5.PNG

AutoHeight-xHeight-plus-CapHeight-plus-xHeight-6.PNG

 

 

Regards,
Uwe Laubender

( ACP )

Likes

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
Reply
Loading...
May 14, 2020 0
Adobe Community Professional ,
May 14, 2020

Copy link to clipboard

Copied

FWIW:
If you work always with the same font you could do it with a single text frame. The contents will be of three paragraphs.

You need three paragraph styles that use the next style feature. So you can wrap all the properties needed into one object style that use also Next Style enabled. Auto height is enabled as well:

 

AutoHeight-OneFrameSolution-DependentOnFont-1.PNG

 

 

Different point size below. Style-Middle is based on Style-Top. Style-Bottom is based in Style-Middle.

Style-Top and Style-Middle have 66% Auto Leading applied. Style-Bottom has 44% Auto Leading applied.

First baseline of the text frame is set to x-Height:

 

AutoHeight-OneFrameSolution-DependentOnFont-2.PNG

 

However, if you change the font you have to adapt the paragraph styles' auto leading values.

 

No need to adapt the styles if you just change the point size of the font, because I did all three paragraph styles with the same font size but with different auto leading values. With the solution that has the three text frames that is not needed. You can freely change the font or font size and the overall height will adapt.

 

Regards,
Uwe Laubender

( ACP )

Likes

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
Reply
Loading...
May 14, 2020 0