Text not centered after exporting to SVG
The text is aligned with the rect element in Gravit, but is transformed to a fixed position in the exported svg.
A fix/workaround for this would be greatly appreciated.
Visually I can’t spot the difference, but I guess you are talking just about the HTML code.
In order to submit for the developers’ review, I need more details. Would you please add more details? Like what you think it should look like.
My apologies I uploaded the same picture twice.
I corrected my post with the correct images.
As you can see now the text is not centered anymore in the converted picture
The problem here is not the missing centering style (btw svg
code does not have such parameters), but rather the different font, which results in different size and hence wrong centering effect.
I think currently fonts are not exported to svg. The only way to correcrly export is to first turn text into path outline.
Unfortunately this is not a solution for me because I need to be able to change the text dynamically too while keeping the text centered.
Is it perhaps an idea to allow exporting to inline svg (base64 string)?
Should I add an official proposal for this request?
Other wise I will have to start looking for a different solution.
Unfortunately, this is a known bug, already filed for fixing but we don’t have an estimated date for that.
As mentioned by GabriellePuppis it’s actually not a bug, but more a limitation in external svg which is not allowing allignment. A solution could be too allow exporting to inline svg (base64 string) which is more powerfull.
More info on base64 can be found here:
Any updates regarding this issue in the meanwhile?
As a temporary solution I am thinking of dynamically replacing the svg text by a html text which is not ideal of course.