slint/tools/figma_import
Simon Hausmann 7cea088a2c Add support for letter-spacing in text
This is conveniently supported by femtovg and Qt
2021-02-16 22:14:50 +01:00
..
src Add support for letter-spacing in text 2021-02-16 22:14:50 +01:00
Cargo.toml Figma import: allow loading from cache and be more resillient when geometry is null 2021-02-12 20:47:59 +01:00
README.md Some work towards a figma importer 2021-02-10 12:49:59 +01:00

figma_import: Figma to SixtyFPS import tool

This tool import a design from figma into a .60 file.

Get a Token from figma

When logged in into Figma, go to "Account settings" (from the "Help and account" submenu of the hamburger menu, Or click on your name, then "Settings")

In the section "Personal access tokens", click on "Create a new personal access token", enter some randeom description, and then copy the token in the yellow frame.

Exporting a file

The file ID is the string of character that is in the URL when you have an open design, for example, the url look like this: https://www.figma.com/file/XxxxxxXXXxxXX/Some-description/...

and the File ID is that XxxxxxXXXxxXX string.

Then you can export that file to a .60 by running the command

cargo run -- --token aaaaaa-bbbbbbbb-cccc-dddd-eeee-ffffffffffff XxxxxxXXXxxXX

With the right token and file id.

This will create a figma_output directory with a main.60 file and some images.

Other options:

  • --node <id> to generate a specific node (eg: "123:12")
  • --child <index> to generate from one of the direct child of the canvas.