Skip to main content
Thomas_Aull
January 11, 2024
Question

Requests to font-helper on linux stopped working

  • January 11, 2024
  • 30 replies
  • 9828 views

I’m running Figma on linux in the browser with figma-linux-font-helper to enable usage of local fonts — this helper is basically a drop-in replacement for the official Figma font helper with the difference that it also works on linux.

Well, it did until today, when I noticed that my local fonts are not available anymore. When Investigating the issue I found that requests to localhost or 127.0.0.1 (with the purpose of communicating with the font helper) were no longer showing up in the network panel of the browser dev tools. Two days ago, everything was working fine and I didn’t change anything on my system since then. I asked around and for other people it’s basically the same story.

After further experiments I discovered that Figma still send the requests, when I overwrite my User agent to:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

My suspicion now is that the app is sniffing the user agent and is not sending the requests to localhost, when it detects that it’s running on linux.

I can’t think of a good explaination how this could be a bug and I’m afraid this is intentional. If that’s the case: WTF?

    This topic has been closed for replies.

    30 replies

    Gayani_S
    Figmate
    Community Support
    January 15, 2024

    Hey Thomas, unfortunately we can’t help you out with your issue, because this is a third party font helper.

    January 15, 2024

    I have the same issue. I use Linux and this is a must. I guess I was wondering when the guys from Figma would deploy code to screw this up 😆

    Thomas_Aull
    January 15, 2024

    This is not an issue with the third party font helper but with the Figma app which doesn’t event send requests to the font helper when it detects it’s running on linux. Like I mentioned when I change my user agent to a non-linux one everything works just fine. Please fix this!

    January 15, 2024

    I’ve tried sniffing the UserAgent header but I didn’t get it to work. I’ve checked the logs from the network tab, and it isn’t even calling localhost.

    Thomas_Aull
    January 15, 2024

    You can override the user agent when running chrome by adding a parameter:

    chrome --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
    

    Or alternatively overwrite it in the dev tools, but I think they’ll need to stay open/enabled in this case.

    January 15, 2024

    Awesome, thanks!

    January 15, 2024

    By the way, I saw your gh issue: Figma does not send requests to font-helper anymore · Issue #15 · tryvin/figma-linux-font-helper · GitHub.

    And was able to fix it by changing the HTTP port 44950.

    Wasn’t the port before 18412?

    When did this changed?

    Anyhow, thanks. This was a life saver, gotta go back to work now lol

    Thomas_Aull
    January 15, 2024

    One small addition, setting the User agent to mac messes with the shortcuts, using the windows one seems to work better:

    Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
    
    January 15, 2024

    We’re in sync. I was just going to say this here 🙂

    I created a script to open Figma on the web using brave:

    #!/usr/bin/env bash
    
    set -euo pipefail
    
    USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.3"
    
    brave-browser --user-agent="${USER_AGENT}" https://www.figma.com/files/recent
    

    Thanks for the tip!

    Ville_Hakulinen
    January 30, 2024

    Relaying a user agent for feature detection is a really poor decision, and lazy engineering. Could it be please be removed?