Skip to main content
bpk101
Inspiring
July 4, 2023
Question

Text bounding box inconsistencies

  • July 4, 2023
  • 3 replies
  • 329 views

I've noticed that the space created above and below text within its bounding box differs greatly depending on what font you're using. Someties the bounding box is failry snug (as in the case with Roboto), and sometimes the spacing is much greater (as in the case with Helvetica).

 

Is there anyway to auto-fit the bounding box to match the cap height of text set in any font whilst keeping the text box as Point Type (as opposed to converting it to Area Type)?

 

 

This topic has been closed for replies.

3 replies

Ton Frederiks
Community Expert
Community Expert
July 4, 2023

And I totally agree with Monika who was just a little faster.

Ton Frederiks
Community Expert
Community Expert
July 4, 2023

There is a trick to display the bounding box fit to the visible objects.

Apply Effect > Path > Outline Object to the text and combine it with the option "Use Preview Bounds" (in Preferences or in  the Align panel menu). Don't forget to turn the Outline Object off before saving as PDF.

Monika Gause
Community Expert
Community Expert
July 4, 2023

Do you need this for alignment? In that case turn on the Glyph snapping in the Align panel.

 

If you want to see it on the artboard. You could apply the Effect > Path > Outline object and then turn on Use Preview bounds in the preferences.

 

Before exporting a PDF, make sure you get rid of all those effects to prevent outlining all your text.

bpk101
bpk101Author
Inspiring
July 7, 2023

I'm trying to create 'dynamic text labels' as described here:

https://www.youtube.com/watch?v=Vt-LT-THpw0

 

Therefore the text needs to remain live / editable. Trouble is the horizontal centering of the text within the box changes depending on which font you use due to the in-built leading some fonts have.

 

I found a workaround where you can select the rectangle in Appearence and use the Effect > Transform function to offset the box but obviously you'd need to do this for every different font you use.

Monika Gause
Community Expert
Community Expert
July 7, 2023

No software can adjust automatically for those visual things. 

 

It would have helped if you had posted that from the beginning.