MmmMaarten Posted March 8, 2021 Share Posted March 8, 2021 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.