Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Center vertically mtext of various sizes.

14 REPLIES 14
SOLVED
Reply
Message 1 of 15
BWYarger
2811 Views, 14 Replies

Center vertically mtext of various sizes.

I need to create mtext with various size fonts and have them center vertically along a line.  I can do this with two mtext objects, but would rather have them all in one.  When I try it in a single mtext object, the bottoms of the letter align even with the justify set to middle center.  How can I get one mtext object to align vertically along the centerlines?

 

Brad
LT, C3D 2005 - 2024
Windows XP, Vista, 7, 10, 11
14 REPLIES 14
Message 2 of 15
pendean
in reply to: BWYarger

Post a sample DWG with your two fonts and what you are trying to achieve.

Message 3 of 15
BWYarger
in reply to: pendean

Attached are a DWG and a JPG of what I am trying to do.  This was done with two mtext objects, actually one mtext and one attribute, but I would like to do it with one mtext so that it will automatically center both horizonally and vertically.  The horizontal is easy using one mtext object, but I can't find a way to do it vertically.  Mtext wants to align along the bottom of the text regardless of the size.

 

Brad
LT, C3D 2005 - 2024
Windows XP, Vista, 7, 10, 11
Message 4 of 15
pendean
in reply to: BWYarger

FONTS are your problem I suspect: you need to find two that are perfectly sized to each other for it to work.

Surprisingly, many are not so entuned.

 

In your sample, the word EXIT had a font override attached and the attribute letters are not the same size. I don't have your other font, so switching EM style to Times New Roman (but not changing the different heights you have for both items) seemd to do what you want.

Message 5 of 15
BWYarger
in reply to: pendean

The type and size of the fonts are required by FHWA and state DOTs.  I was hoping to do it all with a single text or mtext object, but don't see a way.  I tried with Times New Roman, but ran into the same problem.  I can do it with the separate text objects, but then the spacing is not automatic.  I also can do it with software I am developing to place the characters individually, which may be the best way overall. 

 

Brad
LT, C3D 2005 - 2024
Windows XP, Vista, 7, 10, 11
Message 6 of 15
hwalker
in reply to: BWYarger

As Mighty Mouse would say "Here I come to save the day."

 

Use mtext COLUMNS

 

The text in the attached image is left hand column Fritzquadrata at 1.82, right hand side Garamond at 4.0

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 7 of 15
hwalker
in reply to: hwalker

Dagnabit. Can't edit.

 

Here is your drawing with what I'm talking about in it

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 8 of 15
sthompson1021
in reply to: BWYarger

As they say, there's more than one way to skin a cat, or a mouseSmiley Very Happy

Kind of the same principle but I put in a 2 cell table. Hope one of these works for you!

Message 9 of 15
BWYarger
in reply to: sthompson1021

Both columns and two cell table do vertically what I asked.  Neither do exactly what I wanted horizontally in that the mtext columns are the same size regardless of the contents, and center on the dividing line between the two columns, not the contents.  I can size the table column widths independantly, but not automatically to the contents, and then have the table automatically center.  I don't use mtext columns or tables much, so am I missing something on how to auto size the individual columns and then center the whole thing?

 

Brad
LT, C3D 2005 - 2024
Windows XP, Vista, 7, 10, 11
Message 10 of 15
hwalker
in reply to: BWYarger

The only other thing I can suggest is make a block, and make both of the text items attributes.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 11 of 15
heinsite
in reply to: hwalker

... and to continue with that thought, within the block definition align the attribute text items to middle center (MC).

 

Dave

------------------------------------------------------
Dave Hein, P.E.
Message 12 of 15
BWYarger
in reply to: heinsite

I don't see how making a block with attributes helps with aligning around the horizontal middle when the block insertion point is fixed regardless of the content.  The number can be anything from 1 to 999 B, so the insertion point won't necessarily be the center of the block.

 

BTW, the space between the "EXIT" and the number is also fixed.

Brad
LT, C3D 2005 - 2024
Windows XP, Vista, 7, 10, 11
Message 13 of 15
hwalker
in reply to: BWYarger

Attributes are just like mtext in which they can have their own insertion points.

 

Is the block in the attached any help?

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 14 of 15
BWYarger
in reply to: hwalker

The text does not center itself on the sign using two attributes any more than using two text objects.  The insertion point needs to adjust within the block to find the middle of the total length of the EXIT and the number.  In this case, the width of the EXIT is fixed, but the width of the number is variable, but the insertion point is still fixed.

 

What I want is for it to act as a single text object where the insertion point is variable based on the mid point of the total width of the text object, which varies based on the content.  For example, if I have "EXIT 1" and change it to "EXIT 999 A" the "EXIT" moves farther to the left of the insertion point to keep the entire text centered.  Using multiple attributes or multiple text objects, their insertion point would need to move based on the total width of the combined text objects, but the EXIT stays in the same place as the only thing that adjusts is the width of the number.

Brad
LT, C3D 2005 - 2024
Windows XP, Vista, 7, 10, 11
Message 15 of 15
BWYarger
in reply to: BWYarger

Attached is a drawing that may make it clearer.

Brad
LT, C3D 2005 - 2024
Windows XP, Vista, 7, 10, 11

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost