Hyphens doesn't word wrap nicely like spaces. S’abonner

0
Avatar
Yijun Lin

Hi, I'm using a small circular label (11 mm) and thus the font needs to be as large as possible.

I am using the "paragraph" text and I have one field which has the most characters and I would like it word wrapped nicely to maximise the font.

However, when the field has hyphens, it doesn't line feed like a spaces does. I have tried to use the Transform function to 1. Search for hyphen-minus (-) and Insert zero-width space (U+200B) after to force a line feed where appropriate and 2. Search for hyphen-minus and replace with soft hyphen (U+00AD). It didn't seem to work as shown below. Seems like Unicode isn't supported; I get an error regarding invalid characters when clicking Test.


I have also tried using the Character Template function; it always looks good for one entry but bad for the others. For example my template is ???????@-?\n% and any white space from the database no longer word wraps nicely especially if there are no hyphen-minus at all.

Does anyone have a good suggestion or workaround? I could use VBscript as well but I couldn't figure out the right code to get it to work. Basically I'm trying to get the hyphen-minus to behave like a keyboard space - to wrap nicely without breaking at inappropriate parts or by adding zero-width space which the search and replace Transform didn't support. I'm also avoiding having to add spaces manually to the database.

Anyway this is my database csv file:

 

3 commentaires

0
Avatar
Peter Thane
Actions pour les commentaires Permalien

Not exactly sure what you are trying to achieve as the Search - and Replace with <SPACE> seems to work alright with my copy. Have you tried the Search - and Replace with Control Code (arrow to the right of the entry box) HT / Horizontal Tab as an alternative?

0
Avatar
Yijun Lin
Actions pour les commentaires Permalien

Thanks for your reply.

I'd like to display hyphens there instead of spaces. If I do use hyphens the font becomes really small and doesn't line feed automatically like spaces. In most typewriter software like Microsoft word; hyphens always provide an opportunity for automatic line feed. When I googled this problem, I get many results where people do not want to line feed at hyphens and their solution was to use a non-break hyphen. But what I want to achieve here is the direct opposite, the hyphens that I used in this software refuses to line feed automatically.

0
Avatar
Peter Thane
Actions pour les commentaires Permalien

Have you tried adjusting the Replace to add both the Line Feed or Carriage Return (from the Control Code option as above) and then add back the hyphen too, placing whichever one you want first ?

Vous devez vous connecter pour laisser un commentaire.