Jump to content

Export <text> inside SVG will result in weird extra <text> elements


Recommended Posts

I'm creating this graph which I want to be indexalbe via Google so I need to use <text> elements inside my SVG (so I can't convert them to paths), but while exporting to SVG Affinity is creating weird <text> elements some of which only have one letter. How could I fix or prevent this, without manually fixing my SVG afterwards?

<text x="445.224px" y="281.209px" style="font-family:'MyriadPro-Bold', 'Myriad Pro', sans-serif;font-weight:700;font-size:8px;fill:#000516;">P</text>
<text x="449.672px" y="281.209px" style="font-family:'MyriadPro-Bold', 'Myriad Pro', sans-serif;font-weight:700;font-size:8px;fill:#000516;">ost Surgical</text>
<text x="464.054px" y="289.209px" style="font-family:'MyriadPro-Bold', 'Myriad Pro', sans-serif;font-weight:700;font-size:8px;fill:#000516;">C</text>
<text x="468.664px" y="289.209px" style="font-family:'MyriadPro-Bold', 'Myriad Pro', sans-serif;font-weight:700;font-size:8px;fill:#000516;">onsult</text>

I would think that it would create two <text> elements one with `Post surgical` and one `Consult` not have the first letter of each word in its own <text> element. I Know MyriadPro is not a web font and I will convert this when I know what web font I will be using.

Link to comment
Share on other sites

@Callum I think I've found the culprit, there were some really weird characters within the text (I'd copied them from some where else) when I just typed them in within Affinity they seemed fine and others had a negative letter spacing, which resulted in <t-span> elements. 

I could surely still share the file, but think it is not necessary any more, hope this will help others who search for the same issue.

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.