RedMadRobot / figma-export

Command line utility to export colors, typography, icons and images from Figma to Xcode / Android Studio project
MIT License
718 stars 114 forks source link

PreservesVectorData for each icon at all #165

Closed Pavel-Laukhin closed 2 years ago

Pavel-Laukhin commented 2 years ago

Hi, fellows!

Could you add the ability to set preservesVectorData for each icon in general, and not just for certain ones?

subdan commented 2 years ago

Hi. Could you explain please why do you need to set preservesVectorData for all the icons? This parameter is usually used to enable preserve vector data for tab-bar icons

alexey1312 commented 2 years ago

Hi! Example: we want to use one icon size in the figma library, upload to SVG and resize programmatically

subdan commented 2 years ago

I can add ability to use * symbol in the preservesVectorRepresentation property in the future version of FigmaExport:

Example:

preservesVectorData only for the tab bar icons:

preservesVectorRepresentation:
  - "ic24TabBar*"

preservesVectorData for all the icons:

preservesVectorRepresentation:
  - "*"
subdan commented 2 years ago

Done! Please update to the latest version (0.34.0) and try to use:

preservesVectorRepresentation:
  - "*"

to set Preserves Vector Data for each icon.

Pavel-Laukhin commented 2 years ago

Wow! That's great! Thank you so much, Daniil!

Sorry for my long answer. I seem to be having some issues with github notifications.

Yes, you're right. This parameter is usually used to enable saving vector data for tab bar icons. But sometimes we can't be sure that the designers have made all the icons of certain sizes. Thus, there may be situations when we, the developers, will have to take care of the size ourselves. And it can be a bad situation when some images are blurred because their size is somehow changed due to rasterization.

So now we can be sure that everything will look nice and sharp! Thank you!