R
R
rtfm mftr2016-06-06 21:51:01
Graphic arts
rtfm mftr, 2016-06-06 21:51:01

How to master the artboard in Illustrator when editing SVG?

It is required to collect an svg sprite from icons in different files. I am far from vector graphics, I roughly understand that there are no traditional raster sizes here, there are formulas. And yet, when you open an svg file in illustrator, when selecting shapes, you can set sizes for them. Purely intuitively, before gluing into a sprite, I would like to set all the icons to the same size, for example 20x20px, and then stretch or compress using css. And then one has a size of 300px, the other has a size of 40px, some kind of disorder. And here I'm trying to do it like this:
1. Select the shape, enter the size in px in the properties panel
2. Click object > artboards > fit to selected art, the white backdrop fits the shape as in the left picture
3. Save.
Everything seems to be working as it should. But now if you close the file and open it again, something like this happens, this white backdrop goes where it wants to:
37658854821e40c0be0cbd944386b3ee.png
How to deal with it? In foreign Internets I found advice to save in * .ai and then in svg, it did not help, the same thing continues.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Iriney Kalachev, 2016-06-07
@rtfmmftr

It was not possible to repeat the described behavior, my artboards were always in their places.
Maybe try to save SVG through the export interface? It turns out exactly the opposite - no matter where the artboard is, in the saved file it will be exactly around the object, and the object in the center of the artboard.
1. We prepare the icon, adjust the size, no matter where it is located, the main thing is that there are no other vectors on the artboard except for the icon.
2. Instead of the usual saving, we take and export - File> Export> SVG (unchecking Use Artboards).
3. Set up, then you can OK (our SVG will be saved), you can Show code (the code will open in a text editor).
4. I chose the second one, so we save it in a text editor as SVG.
5. Open in Illustrator - the artboard is strictly around the object, the object is in the very center of the artboard.
444.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question