Jump to content

Tight text wrapping produces unexpected results around curved shapes

Recommended Posts

Windows 10, Publisher Build 145.

I've noticed something about tight text wrapping around a curved shape that seems wrong, but maybe someone can explain it to me.
Have a look at the first attached image.

The text is 7pt Arial on a 9pt baseline grid.
The filled blue circle is a layer that has tight text wrapping with a gap of 2pt all-round.
The outlined blue circle - on the right-hand diagram - is 4pts wider and taller than the filled blue circle (observing the 2pt gap of the text wrap).

As you can see, the text is further away from the circle at the top and bottom than it is at the right.
I can understand why, for example, "hendrerit" below the circles isn't anywhere near the outlined circle because the baseline forces it to be further away, but I don't understand why the other text is so far away from the circle.

The second attached image shows the same sort of issue but it looks a lot worse there.

Can anyone explain why this is supposed to happen, or is it a bug? It just doesn't seem quite right to me.

(I've also attached the afpub file in case anyone wants to have a play with it.)

tight wrapping issue 1.JPG

tight wrapping issue 2.JPG

tight wrapping round curves.afpub

Share this post

Link to post
Share on other sites

I have tested your file, and indeed it seems that the calculation for wrapping around edges needs to be tweaked. In the screenshot below, I have opened the file and replaced the text, on the the left, with a letter that descends below the baseline, and on the right, with a letter than ascends above the cap height. I have also selected all of the text to make the text lines more apparent.

I see that in the top of the circle, it appears to align perfectly to the text baseline, as you can see that the tail of the p dips into the outer circle. At the right edge of the circle, it aligns perfectly with the left edge of the text bounding rectangle. And on the bottom, it appears to align perfectly with the cap height of the line of text, as you can see that the acute accent on the É is crossing into the outer circle.

All of these things are probably just what need to happen to appear aligned correctly. It seams that it is the transition from each cardinal direction that it gets progressively worse until about 45°, and then it starts to get better again the closer it gets to the next cardinal direction. Or to describe it differently as though the circle were a compass, it is best aligned at north, east, and south, and worse at northeast and southeast.

Perhaps that is a helpful clue to the developers to see where the problem is? Or maybe not, but that's all I've got.


Share this post

Link to post
Share on other sites

@garrettm30 I think you're probably on the right trail as to where the problem comes from.

I have a feeling that part of the problem is that the text wrap feature can only be given left/top/right/bottom gap distances which are okay for rectangular shapes but are pretty meaningless for curved shapes.
To put it another way, where is the 'right-hand side' of a circle? Is it only at the furthermost right-hand point or does it extend around the curve in either direction for some distance? And, if it does extend around the curve, where does it stop being the right-hand side and start becoming the top or bottom? And what about curves that are more complex than circles? And what about concave shapes? The list goes on.

What would be preferable in this instance would be some kind of 'distance from nearest point' gap size which would work at all points on the curve - somehow, but probably not all points since a curve is essentially infinite in length - but I wouldn't like to even think about how complicated that would be to code or what other problems would probably arise from that. And then you have the issue of wrapping around images that have a transparency, I've no idea how that's done at all.

All-in-all, the text wrap feature tries its best at wrapping and normally does a good job but, in certain cases like this, it doesn't work well enough to do it properly all of the time and some manual intervention is required, in this case adding an extra invisible shape with wrapping that extends a bit further out from the actual shape (as shown in the image attached to this post).

This isn't a massive problem and a quick manual 'fix' can be applied but it's maybe something that could be looked at in future releases. It certainly shouldn't delay the first proper release from coming out.

tight wrapping issue 3.JPG

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now