Figma-Linux / figma-linux-font-helper

Font Helper for Figma for Linux x64 platform
GNU General Public License v2.0
410 stars 34 forks source link

not able to use local fonts #19

Closed NeerajLehar closed 3 years ago

NeerajLehar commented 3 years ago

hello I am not able to use my system local fonts I am using ubuntu 20.4

NeerajLehar commented 3 years ago

have to create a link to the local font in the figmaHelper JSON file

monikkacha commented 3 years ago

@NeerajLehar how can i create a link between local font and figmaHelper Json file ? please specify or give a example .

diegosomar commented 3 years ago
  1. In your home directory, create a new directory named Fonts;
  2. Put your custom fonts in this new directory;
  3. Open the terminal app, past this sudo nano /etc/figma-linux/fonthelper and press ENTER (put your password and press ENTER again;
  4. You got a code like that:
{
  "port": "111111",
  "directories": [
    "/usr/share/fonts",
    "/root/.local/share/fonts"
  ]
}
  1. Add one more line, with the path to your new Fonts directory. The final code will be like that:
{
  "port": "111111",
  "directories": [
    "/usr/share/fonts",
    "/root/.local/share/fonts",
    "/home/yourusername/Fonts/"
  ]
}

Remember to change yourusername to your system user name AND to put a comma after the line 5;

  1. Press CTRL + X to close and Y to save;
  2. Still in the terminal, past this line sudo systemctl restart fonthelper.service and press ENTER;

The font service will be restarted and your custom fonts are now available in Figma web.