Jump to content
You must now use your email address to sign in [click for more info] ×

Center Text On Baseline


Recommended Posts

I have a small request.

Much of the work I do involves putting text on a path (usually a circle) and then offsetting the text so that the path runs through the middle of the text. I can do this by eyeballing the text and path while adjusting the percentage in the baseline offset, but it would be convenient if the baseline offset had a "center text on baseline" setting.

VectorStyler has this, but I prefer Affinity Designer since I find it easier to use for what I need.

Link to comment
Share on other sites

Thanks, but I don't think that would work for what I'm doing. Maybe a grid consisting of concentric circles would be useful, but as far as I can tell, Affinity doesn't have that feature. I doubt a concentric grid would work very well, anyway, since I often need far more precision than grids are usually set for. I used to use fine grids when I started out, but I have since found easier/faster ways to get the results I need.

What I often need to do is center text on a circular path between two other circular objects (see attached example). My method for doing this is to create a circle that is located precisely at the halfway point between the outer circular object and the inner circular object. I then place the text on that circle and adjust the baseline offset. None of this is tricky or time-consuming, but I do have to do a little math to determine the exact size of the circle. I don't mind doing math, though. I'm an engineer. :)

My method works fairly well, and I've found that a baseline offset of 37% usually gets the text approximately centered on the circle, but I have to eyeball it, and it depends a bit on the font. I was just thinking that a "center text on path" setting in the baseline offset would be convenient.

Sample Stamp.png

Link to comment
Share on other sites

Just in case anyone is interested, off on a bit of a tangent, I managed to get something similar – purely out of curiosity –  with a Mesh Warp Group.

It’s not perfect by any means (for starters there are lots of gaps, and the text is ‘wobbly’), and it took ages to get to the point where it is now, but it’s maybe something that could be useful if done properly – see attached image (where I show the warping handles) and sample document.

Hopefully someone can tidy up my mess, or start from scratch, and share a warp which is much better than my attempt.

P.S. I think the original idea of the thread – auto-centre the text on the curve – would be a useful addition.

image.thumb.png.850a166a99bf1eb3657ab0e27e68af09.png

mesh-warp-group-curved-text.afdesign

Link to comment
Share on other sites

2 hours ago, jeff43222 said:

it depends a bit on the font. I was just thinking that a "center text on path" setting in the baseline offset would be convenient.

But that still would be dependant on the font. And another thing to take into consideration is that you have all uppercase letters in your example. There are descenders which may or may not need to be taken into consideration. And then again, it would depend on the font.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

8 hours ago, Old Bruce said:

But that still would be dependant on the font. And another thing to take into consideration is that you have all uppercase letters in your example. There are descenders which may or may not need to be taken into consideration. And then again, it would depend on the font.

True. Thus far I've only had to do this for text that was all uppercase, but I do have some work coming up that will require a mix of uppercase and lowercase.

I just checked in VectorStyler, and I discovered that the "center text on baseline" function appears to always consider the center of the text as the midpoint between the character's baseline and the cap height. So the function works fine for all uppercase, but it doesn't center properly if there is a mix of uppercase and lowercase, and it's also off if all characters are lowercase. It's way off if all characters are lowercase and any of them has a descender.

Maybe this feature I suggested would be a bit complicated to implement. The software would have to determine the center of the text based on what characters are included in the text string, and that would be affected by cap height, ascender height (if different from cap height), x-height, and descender height at a minimum. I'm sure there would be other complications if small caps or other alternate forms are used.

I suppose it could be done somehow if Serif wanted to tackle it. I'm not sure how much demand there would be for such a feature. It's not a big deal to me if I have to adjust the baseline offset manually, though.

Link to comment
Share on other sites

This could make for a good script, when we have scripting. I tried to come up with an algorithm to do it earlier today and encountered the same issues with choosing the best mid-point.

I played around with a few dozen fonts and found that setting Leading Override to Font Size / X * -1 where X is 3 for all caps and 4 for mixed case worked surprisingly well. e.g., if the font size is 72 points and you're using all caps then set leading override to -24 points but for mixed case set it to -18. You might have to tweak it a point or two one way or the other but it's a good starting point. If I was writing a quick and dirty 'centre on baseline' script it would just calculate the leading override in this manner and the user could then tweak it.

Cheers

Download a free manual for Publisher 2.4 from this forum - expanded 300-page PDF

My system: Affinity 2.4.2 for macOS Sonoma 14.4.1, MacBook Pro 14" (M1 Pro)

Link to comment
Share on other sites

7 hours ago, MikeTO said:

This could make for a good script, when we have scripting. I tried to come up with an algorithm to do it earlier today and encountered the same issues with choosing the best mid-point.

I played around with a few dozen fonts and found that setting Leading Override to Font Size / X * -1 where X is 3 for all caps and 4 for mixed case worked surprisingly well. e.g., if the font size is 72 points and you're using all caps then set leading override to -24 points but for mixed case set it to -18. You might have to tweak it a point or two one way or the other but it's a good starting point. If I was writing a quick and dirty 'centre on baseline' script it would just calculate the leading override in this manner and the user could then tweak it.

Cheers

I like that idea, but as you said, "when we have scripting." :)

One thing I just noticed was that the height of an artistic text object changes based on the characters included in the text string. So all that would really be needed would be to find the center of the object, which I'm sure wouldn't be terribly difficult to do. Unfortunately, I can't use that information to precisely center the text box on the path since the only option is to adjust the offset by percentage rather than by a set distance. And I was so looking forward to doing a little more math. :P 

Actually, I could get it perfect if I wanted to change my approach. Rather than centering the text on the path, I could just locate the path at the baseline of the text after calculating the distance between the outer and inner curves and then taking into account the height of the text object. But that would only work in a specific case since the text size would have to be known in advance. With my current approach, I can vary it on the fly.

I can still just eyeball it. It works well enough for what I need. But the engineer in me sure would like the "center text on path" setting. 

 

Link to comment
Share on other sites

1 hour ago, Return said:

You could use the baseline option in the character panel(positioning&transform) to adjust to tenths by holding ctrl while using the mousewheel.
 

Thanks! I wasn't aware of that option. 😁

What I found was that on my machine (iMac), holding the shift key and using the mouse wheel provides the adjustment in tenths you mentioned. The other keys (control, option, command) have no effect on the adjustment rate, which seems to default to hundredths. Either way, this provides me with some good fine-tuning options.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.