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

Cannot right-pad right-aligned text with either spaces or non-breaking spaces


mqudsi

Recommended Posts

With a textbox set to right-aligned, I can enter trailing whitespace in Illustrator to manually offset the text in a multiline textbox by some pixels:

image.png.815d863e5dfc54581ce87c0d10db1954.png

 

In Affinity Designer, any trailing whitespace is ignored when the text is rendered, regardless of whether I use regular spaces (U+0020) or even non-breaking spaces (U+00A0):

image.png.42209f6663d5b8c19bc5e397a4d8f94a.png

 

(Notice how the text insertion caret is blinking outside the bounds of the multiline text box because the whitespace is completely ignored for font setting purposes.

Link to comment
Share on other sites

  • Staff
17 hours ago, mqudsi said:

With a textbox set to right-aligned, I can enter trailing whitespace in Illustrator to manually offset the text in a multiline textbox by some pixels:

 

We do have an issue where right aligned text and spaces are ignored but was closed as By Design.  Designer is a bit limited with its text controls ect and from speaking to the QA team, the method they would recommend is drawing out the shape and convert it to a shaped frame and controlling it via the node tool. Something like the attached screen recording.

If this was in Publisher, you could set a custom word wrap for this but sadly that is a Publisher only feature.

Link to comment
Share on other sites

You could do a Character Style that is unchanged except for the colour, make it 0% opacity and then put a "m", "b" or "I" with that invisible Character Style at the end of the line.

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

4 hours ago, mqudsi said:

Thanks - seems doable, if unnecessarily long for a one-liner. Can you specifically ask if we can at least change the behavior if a specifically non-breaking space (U+00A0) is used? I'm sure that would preserve whatever reasons they have for trimming trailing whitespace, while allowing this quicker workaround.

The Unicode word joiner (2060) character is used to glue words together.
So if you insert it at the end with some space it works.

Below is a regular space (highlighted so you can see it) + the word joiner at the end.

2021-11-16_12-49-22.png.ceb587cf44c821a2f3a0acca6c8548b4.png

You can narrow the width of the space by reducing the point size.
Or just use a thin space, or other width of space, etc.
The key is having the word joiner because it breaks the Unicode whitespace algorithm.

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.