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

Please export text alignment as 'text-anchor' attribute/style in SVG


Recommended Posts

When designing for interactives with text inside the exported svg, I was surprised to see that the alignment, as set to a text in Affinity, wasn't exported. The alignment was 'flattened' during export so it is always left-aligning.

Because of this, when setting the text with code in the created svg <text> element, it will not be aligned as set in the design, but always left-aligned. So we need to add extra, redundant, steps in code to add this 'text-anchor' rule to every text object that isn't left aligned and correct each position. Which is a pitty, as svg <text> elements have an alignment property, called 'text-anchor', which would do this automatically. But right now Affinity doesn't export the alignment to the 'text-anchor' css property (or inline svg attribute).

Please Serif, export text alignments with the alignment in tact, using the 'text-anchor' property, when exporting to svg so we don't need to align stuff with code afterwards!

(about text-anchor on mdn: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor )

Thanks for considering this!

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.