Help me to port Figma Font Server to FreeBSD

Frame 1.jpg


Hello, I'm not a developer, but working as designer in software development. As many other designers nowadays, we're using Figma as a main tool. Figma can be open in FreeBSD in a web browser, no issue at all. But the most important part is missing: It can't read local fonts from the browser just like that, it requires a Figma font server.

There is a couple of them:
- Official from Figma (called Font installer), but it's for Mac or Windows

SCR-20241030-jzfk.png


And some third party implementations, but for Linux. Some uses Docker, or other services, that I'm not familiar with:
- figma-linux-font-helper 1
- figma-linux-font-helper 2
- figma-linux-font-helper 3

I'm looking for a developer who can help on that.
Your support could make a significant difference, and together, we can create a more inclusive environment for designers everywhere. Let's make it happen!
 
There is a couple of them:
- Official from Figma (called Font installer), but it's for Mac or Windows
It's closed source, so there's nothing to port here.

And some third party implementations, but for Linux. Some uses Docker, or other services, that I'm not familiar with:
- figma-linux-font-helper 1
This is probably the easiest one, it's two Python scripts that use www/py-flask and www/py-flask-cors.

Code:
dice@fbsd-test:~/temp % git clone https://github.com/tryvin/figma-linux-font-helper.git
Cloning into 'figma-linux-font-helper'...
remote: Enumerating objects: 80, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 80 (delta 6), reused 8 (delta 1), pack-reused 58 (from 1)
Receiving objects: 100% (80/80), 19.32 KiB | 2.42 MiB/s, done.
Resolving deltas: 100% (35/35), done.
dice@fbsd-test:~/temp % cd figma-linux-font-helper/
dice@fbsd-test:~/temp/figma-linux-font-helper % ll
total 42
-rw-r--r--  1 dice dice   28 Oct 30 11:45 .dockerignore
-rw-r--r--  1 dice dice   90 Oct 30 11:45 .env.example
drwxr-xr-x  8 dice dice   13 Oct 30 11:45 .git/
-rw-r--r--  1 dice dice 1203 Oct 30 11:45 .gitignore
-rw-r--r--  1 dice dice  209 Oct 30 11:45 Dockerfile
-rw-r--r--  1 dice dice 1060 Oct 30 11:45 LICENSE
-rw-r--r--  1 dice dice 1346 Oct 30 11:45 README.md
-rwxr-xr-x  1 dice dice  493 Oct 30 11:45 docker-compose.yml*
-rw-r--r--  1 dice dice 2051 Oct 30 11:45 helpers.py
-rw-r--r--  1 dice dice   23 Oct 30 11:45 requirements.txt
-rw-r--r--  1 dice dice 2380 Oct 30 11:45 server.py
dice@fbsd-test:~/temp/figma-linux-font-helper % sudo pkg install www/py-flask www/py-flask-cors
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 9 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        py311-Babel: 2.16.0
        py311-Flask-Cors: 3.0.8_1
        py311-Jinja2: 3.1.4
        py311-blinker: 1.8.2
        py311-click: 8.1.7
        py311-flask: 3.0.3
        py311-itsdangerous: 2.2.0
        py311-markupsafe: 2.1.5_1
        py311-werkzeug: 3.0.4

Number of packages to be installed: 9

The process will require 36 MiB more space.
8 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/9] Fetching py311-markupsafe-2.1.5_1.pkg: 100%   20 KiB  20.0kB/s    00:01
[2/9] Fetching py311-Babel-2.16.0.pkg: 100%    6 MiB   6.7MB/s    00:01
[3/9] Fetching py311-werkzeug-3.0.4.pkg: 100%  522 KiB 534.1kB/s    00:01
[4/9] Fetching py311-Jinja2-3.1.4.pkg: 100%  302 KiB 309.0kB/s    00:01
[5/9] Fetching py311-blinker-1.8.2.pkg: 100%   18 KiB  18.5kB/s    00:01
[6/9] Fetching py311-flask-3.0.3.pkg: 100%  164 KiB 168.3kB/s    00:01
[7/9] Fetching py311-click-8.1.7.pkg: 100%  204 KiB 209.2kB/s    00:01
[8/9] Fetching py311-Flask-Cors-3.0.8_1.pkg: 100%   21 KiB  21.9kB/s    00:01
[9/9] Fetching py311-itsdangerous-2.2.0.pkg: 100%   29 KiB  29.3kB/s    00:01
Checking integrity... done (0 conflicting)
[1/9] Installing py311-markupsafe-2.1.5_1...
[1/9] Extracting py311-markupsafe-2.1.5_1: 100%
[2/9] Installing py311-Babel-2.16.0...
[2/9] Extracting py311-Babel-2.16.0: 100%
[3/9] Installing py311-werkzeug-3.0.4...
[3/9] Extracting py311-werkzeug-3.0.4: 100%
[4/9] Installing py311-Jinja2-3.1.4...
[4/9] Extracting py311-Jinja2-3.1.4: 100%
[5/9] Installing py311-blinker-1.8.2...
[5/9] Extracting py311-blinker-1.8.2: 100%
[6/9] Installing py311-click-8.1.7...
[6/9] Extracting py311-click-8.1.7: 100%
[7/9] Installing py311-itsdangerous-2.2.0...
[7/9] Extracting py311-itsdangerous-2.2.0: 100%
[8/9] Installing py311-flask-3.0.3...
[8/9] Extracting py311-flask-3.0.3: 100%
[9/9] Installing py311-Flask-Cors-3.0.8_1...
[9/9] Extracting py311-Flask-Cors-3.0.8_1: 100%
dice@fbsd-test:~/temp/figma-linux-font-helper % python3.11 server.py 0.0.0.0
 * Serving Flask app 'server'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:18412
 * Running on http://192.168.10.20:18412
Press CTRL+C to quit
 
SirDice thank you for the help! I just tried in FreeBSD 14.2 and that server sees local fonts well.

But I wasn't able to select it in Figma itself. Maybe because Firefox has some limitations to reading local fonts? I don't know yet. Trying to use LLM to fix that, but yet no luck.
 
Back
Top