• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
5

Export SVG text coordinates bug. Text-align:center doesnt export to SVG

Community Beginner ,
Nov 22, 2019 Nov 22, 2019

Copy link to clipboard

Copied

I have a problem with exporting to SVG correct coordinates of text and text alignment. 

01_coordinates1.jpg

 

X coordinate of text "1" is 1533,9 px

 

Lets align text to Center and center 1...5 Horizontal Align Center...

02_Align.jpg

 

As you can see text alignment point have changed to Center of "1" text.

03_Align and coordinates.jpg

x axis coordinates now 1542,35 text align: Center.

 

Lets Save as SVG and...

In svg file there is NO alignment attribute at all, and x coordinate is 1535.7031 instead of 1542,35

 

<g id="k1">
<path id="path13" style="fill:none;" d="M1470.5,667.6H1615v68.2h-144.5V667.6z"/>
<text id="text15" transform="matrix(1 0 0 1 1535.7031 714.1688)" style="font-family:'GraphikLCG-Regular'; font-size:33.314px;">1</text>
</g>

 

How to export ALL text attributes to SVG? How to export Bottom-center coordinates of "1" instead of Bottom-Left coordinates of "1"?

 

We have to make an automation task on our web-site and plan to change text "1" with other data, for example "12,6" and have to make it look same cool and aligned as it is in source file.

 

Please help!

SVG file attached.

 

TOPICS
Bug , Draw and design , Import and export

Views

3.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Advocate ,
Nov 22, 2019 Nov 22, 2019

Copy link to clipboard

Copied

Salut!

Modifier manuellement avec :

<text transform="matrix(1 0 0 1 89 325)" text-anchor="middle">12.5</text>

<text transform="matrix(1 0 0 1 89 335)" text-anchor="middle">3</text>

ici tous les textes de la colonne doivent avoir la même valeur de X 89 (centrage)

De elleere

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2019 Nov 22, 2019

Copy link to clipboard

Copied

Thanks!
But it is a task of automating the process. There are hundreds of this files... I know how to code, but manually it is a too loooooong way. I have to find the way how to force Adobe Illustrator to do its work)
Design once. Export. No coding.

 

Yes you can use inkscape, yes you can use boxy SVG, yes you can code it with pixels shift on calc, but you have paid for Illustrator, ist it? 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 23, 2019 Nov 23, 2019

Copy link to clipboard

Copied

Salut!

En effet, il semble que là Illustrator ne soit pas à la hauteur...

c'est très regrettable.

René

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 24, 2020 Jan 24, 2020

Copy link to clipboard

Copied

Salut dmitkat!

Je voudrais savoir si tu as résolu ton problème.

Enregister Sous... svg à partir de ai en conservant la justification centrée des textes k1 k2...

René

PS comme tu as dit que tu savais programmer, je ne m'étais plus préocupé de la question.

Je peux peut-être t'aider?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 19, 2020 Feb 19, 2020

Copy link to clipboard

Copied

I have the same problem!!!

Lot of ai files converted to svg with placeholder to substitute with numbers automatically, and the final result is text are all left centered with respect to the original position of placeholder.

Serious bug in my opinion...SVG supports natively the text alignment...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 19, 2020 Feb 19, 2020

Copy link to clipboard

Copied

Only one way to do it:

Do your design as you want it to be.

Save As SVG (Not Export)

Open in Inkscape (for Mac is MUCH stable version is Development version https://inkscape.org/release/inkscape-master/?latest=1)

Click on text, Alt+Shift+A (select same objects) - you will have all text selected - do alignment to Center. Now you have perfect coordinates. Save.

Enjoy.

 

With some fonts you will need a slightly correction - click on Select tool, use arrows on keyboard to shift.

 

If you need to know how to remove all this dirt illustrator export as group id, text id, path id: _1_, _2_, _x54_ etc in automated mode - write me on email - [Private mail address removed]

 

Do not write any private info in public, please use PM. [Moderator]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 23, 2023 Mar 23, 2023

Copy link to clipboard

Copied

Hi, thanks for identifying the problem and finding a workaround! Since I would have to do this for many files manually, I wonder if by now there is an alternative way in Illustrator to achieve correct centering of text or if there is an automated way to do centering in a post-processing step of the svg-file, e.g. using command line Inkscape in the package "svg" in LaTeX?
Nevertheless, it is quite unsatisfying that the high-end solution Illustrator is not able to handle text alignment properly...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 06, 2023 Jul 06, 2023

Copy link to clipboard

Copied

More than three years later, this issue has still not been fixed. Adobe, what are you waiting for? 😞

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 07, 2023 Jul 07, 2023

Copy link to clipboard

Copied

LATEST

@Astronomie-Québec  schrieb:

More than three years later, this issue has still not been fixed. Adobe, what are you waiting for? 😞


 

If you want to reach out to the developers, you might want to use the platform that they use.

https://illustrator.uservoice.com 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines