Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to vector drawable when possible (primarily action bar/tab, and generic icons) #107

Open
AndroidDeveloperLB opened this issue Aug 25, 2016 · 12 comments

Comments

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented Aug 25, 2016

because now it's supported on various Android versions.

@romannurik
Copy link
Owner

that's a good idea, but will take a bunch of new code... i hope to revamp the asset studio at some point, this would be a great feature request for that time

@AndroidDeveloperLB
Copy link
Author

You could export to SVG, so that designers could also modify the files easier.

@romannurik
Copy link
Owner

Explored this; it's basically not feasible to export vectors for any foreground images except clipart. I think it's probably better to use the Android Icon Animator tool.

See also #121 and #123

@AndroidDeveloperLB
Copy link
Author

Why not ?
You can already convert SVG files to VectorDrawables, like on Android Studio.
When you create the image files from the selection (not from image files of the user), it uses SVG files too, no?

@romannurik
Copy link
Owner

Yes it would be possible for clipart, but not custom uploaded images, or text. I'll actually re-open and re-frame the request.

@romannurik romannurik reopened this Jan 17, 2017
@romannurik romannurik changed the title Request: allow to export to vectordrawable too Export to vector drawable when possible (primarily action bar/tab, and generic icons) Jan 17, 2017
@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Jan 17, 2017

Text is not possible only because VectorDrawable doesn't support it (sadly), right?
Just like it doesn't support many other SVG features, like gradients...
But I think you can export to SVG and to VectorDrawable , by converting to paths.

@romannurik
Copy link
Owner

text isn't possible because we'd need to convert the text to paths, and this isn't possible in the browser AFAIK (you can't extract shapes from a web font).

@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Jan 17, 2017

But fonts are by definition vectorized, no? So that no matter how you resize them, they will keep being sharp and nice...
There are even tutorials for this. Here's an example:
http://www.graphic-design-employment.com/adobe-illustrator-how-to-convert.html
Are web fonts different?

@romannurik
Copy link
Owner

I'm not sure I follow. For a web-based tool to generator vector icons from text that uses a web font, the web-based tool needs to somehow have access to the font's path data. This isn't feasible right now. If you really want a vector drawable where the shape is a letterform from a web font, the best option is to download the font, use it in something like Illustrator or Sketch, convert the type layer to outlines ('expand' in Illustrator), export to SVG, and convert to vector drawables using any one of the popular SVG-to-VD converters (e.g. the Vector Asset Studio in Android Studio, or the Android Icon Animator tool, or something else)

@AndroidDeveloperLB
Copy link
Author

It's not possible to get the font's paths? So how does it get drawn? Only by black-box commands of the web browser's engine?

@romannurik
Copy link
Owner

Yes take a look at imagefield.js if you're interested.

@AndroidDeveloperLB
Copy link
Author

OK sorry. Just not my field, so I sometimes don't know what is possible and what's not on a web browser.
It's too bad though. Isn't it even possible to handle fonts that are inside the website? Like Roboto ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants