Getting text centered in circles

Started by Jennifer, December 27, 2011, 02:08:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jennifer

I want to use small circles (0.15 in) as numbered annotations on an illustration. The problem is that the numbers are not centered in the circles. I've tried setting indentation, spacing, and text block margins all to zero. None of those seemed to make any difference.

In the attached Visio document, the first row or circles show numbers that are above the center line.

In the second row, I increased the line spacing to 150%, which seems to get them centered. (The default is 120%.)

Is there a better way?
Using Visio 2019, part of Office 365 on Windows 10

JuneTheSecond

Another way would be to use text block tool.
1. Select circle
2. Select text block tool
3. Move text vertically with up/down arrow keys

Or change the value of txtPinY cell in the shapesheet.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

Jennifer

The problem is that the text is not centered in the text box.

I tried to attach an image like you did. If I did it right, you should see that the text box on the "0" circle is perfectly centered on the circle, but the text is not centered in the text box.
Using Visio 2019, part of Office 365 on Windows 10

wapperdude

I think you've done it correctly. 

Note, setting the Text Block margins, especially, left & right, will allow greater text width before it wraps to a new line.  Setting the line spacing to something other than 120% is the most logical way to center the text.  You might find that 140% is slightly better than 150%, and that it varies depending upon font face.

The other option is to open the shapesheet, right click>insert section>Text Transform.  Then you can play with the TxtLocPinY entry and / or the TxtPinY entry. 

HTH
Wapperdude
Visio 2019 Pro

Jennifer

I think Visio has a problem with text alignment. I've attached two files. One if a jpeg screen capture of a Visio page. The other is the Visio file itself. It shows a bun ch of 1" squares with the letter "X" in the text box. In all of the squares, the text is centered horizontally. Each set shows the text aligned vertically in the middle, top, and bottom.

The left column has the line spacing set to 150%. This is necessary to get the text centered vertically. However, it breaks down for top and bottom alignment if the point size gets over a certain size.

The right column has the line spacing set to 100%, which I assume really means zero leading. Now the align top works. The align middle is off a little and the align bottom is off a little more (about double).

The two text boxes at the bottom seem to confirm my suspicion that 100% line spacing = zero leading and 150% line spacing = 50% leading. Why not just call it leading?

It seems to me that with all "adjustments" set to zero, center ought to center. Period.
Using Visio 2019, part of Office 365 on Windows 10

saveenr

#5
@Jennifer - If you use the technique of controlling the TxtLocPinY then the alignment in all cases will come out to what you would expect. I just tried this and verified it works.

For reference here is what I set the cells to

Text Transform cells
TxtWidth = Width
TxtHeight = Height
TxtPinX  = Width * 0.5
TxtPinY  = Height * 0.5
TxtLocPinX  = Width * 0.5
TxtLocPinY  = Height * 0.55
   (this fudge factor depends on the font - adding an extra 0.05 works well for Arial)

Text Block Format Cells
LeftMargin = 0
RightMargin = 0
TopMargin = 0
BottomMargin = 0

Having said that the behavior accounting for line spacing in the alignment is a bit odd. I think one would expect alignment to align in an optically consistent manner. Curiously this behavior is the same as PowerPoint 2010 but Word 2010 behaves differently - but just as oddly.

wapperdude

I believe there are several issues involved.  Both involve font typography, i.e., how a font face is constructed.  Namely, how is the vertical center of the font defined.  Second, how is line spacing defined?  Is it center to center of the font face, or bottom to top?  Finally, if you have a single row of text, why should the line spacing even have an impact?  The impact is, vertical center doesn't necessarily mean visual center.  Upper case vs lower case obviously would give different results.    

Just rambling here, but the point is, it's not so simple.  I've attached a modified version of your file that uses a variety of font faces, middle alignment.  As is quite obvious, it takes different settings to get the font faces to center.

HTH
Wapperdude
Visio 2019 Pro

Jennifer

Yes, I understand that fonts are complicated and alignment is affected by a lot of things including font, case, ascenders, descenders, etc.

However, I still think that Visio is doing a particularly poor job of it here. Even Word, not the sharpest knife in the drawer, handles it better. The attached example illustrates my point. The table has fixed-size cells (1" square). Using two standard and two decorative fonts, Word gets the Xs centered pretty well until the point size gets large.

Anyway, setting the line spacing to 150% achieves what I need for now. Thanks to everyone for the help. If I get time later, I'll look into the more exotic solutions. I'm still little more than a beginner at Visio.
Using Visio 2019, part of Office 365 on Windows 10