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

Hyphenation in exported svg files could be improved


Recommended Posts

Hi,

today I came across an interessting behaviour of exported svg files... and I am not sure whether its a shortcoming or a bug - and who is to blame!

I was creating a larger graphic with some text frames in AD. For a proper text flow I inserted manually some soft hyphens and exported the design in the svg format eventually. In order to keep the file size small, I did not convert the text to curves.

Afterwards I imported the svg file to MS Word (current version). The within the imported graphic displayed an interesstion behaviour: Whenever a hyphen was needed to smoothen the text flow within the graphic Word inserted another hyphen. So I ended up with "--" instead of a simple "-" plenty of times when a line had to be wraped. It doesn't matter whether automatic hypenation ist switched on or off in Word.

You'll find all files needed to recreate the issue attached.

Cheers, Volker

 

textumbruch.afdesign textumbruch.svg

Link to comment
Share on other sites

I opened the SVG file as-is on several different apps on my Mac:

Safari, QuarkXPress and Inkscape seem to render the file just fine, without any signs of double-hyphenation.

VectorStyler completely messes up the rendering of the file, so did not take the time to pull it apart looking for the hyphens in that one.  Not sure why.

Link to comment
Share on other sites

On 11/1/2021 at 11:18 AM, VolkerMB said:

Whenever a hyphen was needed to smoothen the text flow within the graphic Word inserted another hyphen. So I ended up with "--" instead of a simple "-" plenty of times when a line had to be wraped. It doesn't matter whether automatic hypenation ist switched on or off in Word.

There are actually two hyphens in the SVG.
One hyphen is the soft hyphen (00AD).
The other hyphen is the hyphen-minus (002D).
Arial has both of those characters (code-points) mapped to the same glyph.
So Word is just showing what is actually there in the SVG.

Some fonts have no glyph there for soft hyphen (00AD), so nothing appears.
This some-have-it, some-do-not has to be handled by the applications.
Some applications display nothing for soft hyphen (00AD), even if there is a glyph in the font.
That would explain why QuarkXPress, and Inkscape show only one hyphen.

Affinity apps should not be including both of those different hyphens in the SVG.
So that is a bug.
May be technically "correct", but the result is bad.
Which is why other DTP apps, and browsers, do not show the 00AD.

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.