Coder Social home page Coder Social logo

font-reader's Introduction

Figma electron app (unofficial)

Figma-linux is an unofficial Electron-based Figma desktop app for Linux.

Snap

Buy Me A Coffee donate button PayPal donate button

Installation

Universal

You can install Figma-linux from Snap here.

Alternatively, type

sudo snap install figma-linux

in your terminal.

To use local fonts when using the snapd version create a symbolic link:

sudo ln -s $HOME/.local/share/fonts $HOME/snap/figma-linux/current/.local/share/

There is also an AppImage available. Get it on our Releases page, then make it executable and install using these terminal commands:

chmod +x figma-linux-*.AppImage
sudo ./figma-linux-*.AppImage -i

This is not a portable AppImage - it will install figma-linux on your system, after which you can run it from terminal or from your app list. For more info, execute

./figma-linux-*.AppImage -h

Debian-based Distros

Firstly, install libgconf-2-4:

sudo apt install libgconf-2-4

Download the .deb package from the Releases page, and install it with dpkg or your favorite .deb installer.

sudo dpkg -i figma-linux_*_amd64.deb

Ubuntu

On Ubuntu, you can use our PPA:

sudo add-apt-repository ppa:chrdevs/figma && sudo apt update && sudo apt install figma-linux -y

If you receive a NO_PUBKEY error while running apt update, then you must add the key manualy:

sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com 70F3445E637983CC

Alternative Ubuntu install

Download the .deb package from the Releases page, and install it with apt.

sudo apt install figma-linux_*_amd64.deb

Arch-based distros

Figma-linux is available on the AUR. You can use an AUR helper like yay to install it:

yay -S figma-linux-bin

Other AUR packages:

  • figma-linux - the package install binary version from release tag
  • figma-linux-bin - the package install binary version from release tag
  • figma-linux-git - the package build the app from Githab from latest release tag
  • figma-linux-dev-git - the package build the app from Githab from latest commit on the dev branch

RPM-based distros

Download the .rpm package from our Releases page, then install it:

sudo dnf install figma-linux-*.x86_64.rpm

Nixos

On Nixos, you may add figma-linux in the environment.systemPackages list of your /etc/nixos/configuration.nix and run:

sudo nixos-rebuild switch

Building from source

  1. Clone the repository:
git clone https://github.com/Figma-Linux/figma-linux
cd figma-linux
  1. Install prerequisites from npm:
npm i

To run Figma-linux from npm in dev mode execute this:

npm run dev

Aside from that, you can also run:

  • npm run dev to run the app in development mode
  • npm run build to built the app for production
  • npm run start to run the built version
  • npm run builder to package the app for distribution.
    • The build targets are listed in ./config/builder.json. You can remove the ones you don't need or don't have dependencies for.
  • npm run pack to remove old packages from the installer directory, then pack the app.

Example of .env for local development:

NODE_ENV=dev
DEV_PANEL_PORT=3330
DEV_SETTINGS_PORT=3331

Community

Join us on Telegram or Spectrum.

Become a Backer

You can contribute to figma-linux development by supporting us on Paypal or Buy me a Coffee:

Buy Me A Coffee donate button PayPal donate button

Thanks to the supporters.

font-reader's People

Contributors

chugunovroman avatar

Watchers

 avatar  avatar

Forkers

isabella232

font-reader's Issues

Lib fails to read some ttf fonts

(which are then not accessible in FigmaLinux)

All msttcorefonts fail to be parsed in my environment:
(using font-reader/main.rs)

font-reader
Read '/usr/share/fonts/truetype/msttcorefonts/Arial.ttf' font error: Cannot read value of the head table param, id: 2, err: incomplete utf-8 byte sequence from index 8

While some other truetype fonts work properly:

font-reader
Font /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf
Font count: 1
 family: DejaVu Serif
 id: DejaVu Serif
 style: Book
 postscript: DejaVuSerif
 weight: 400
 stretch: 5
 italic: false

Font files seem valid, and can be read using ttf-parser crate (using font-info example):

font-info /usr/share/fonts/truetype/msttcorefonts/Arial.ttf                      
Family name: Some("Arial")
PostScript name: Some("ArialMT")
Units per EM: 2048
Ascender: 1854
Descender: -434
Line gap: 67
Global bbox: Rect { x_min: -1361, y_min: -665, x_max: 4154, y_max: 2124 }
Number of glyphs: 1320
Underline: Some(LineMetrics { position: -217, thickness: 150 })
X height: None    
Weight: Normal
Width: Normal
Regular: true
Italic: false
Bold: false           
Oblique: false
Strikeout: Some(LineMetrics { position: 530, thickness: 102 })
Subscript: Some(ScriptMetrics { x_size: 1434, y_size: 1331, x_offset: 0, y_offset: 283 })
Superscript: Some(ScriptMetrics { x_size: 1434, y_size: 1331, x_offset: 0, y_offset: 977 })
Variable: false 
OpenType substitution:
  Scripts:  
    arab
      No languages
  Features:
    init        
    medi    
    fina    
    liga    
Elapsed: 693us

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.