neetly/figma-agent-linux

SF Pro Regular is not being detected

heysupratim opened this issue · 7 comments

Thank you for making this wonder service. I thought installing SF pro for some of my figma designs should be relatively easy however, once installed on PoP OS 22.04. Figma lists all font variants except regular. Medium, Bold, Semibold every variant is listed perfectly but regular font weight is just missing.

I think its something to do with font matching that FontConfig is doing for that particular font weight.

Hi, could you please provide me the output of this command?

fc-list "SF Pro" : family style variable

Thanks.

SF Pro:style=Thin:variable=False
SF Pro:style=Light Italic:variable=False
SF Pro:style=Heavy:variable=False
SF Pro:style=Black Italic:variable=False
SF Pro:variable=True
SF Pro:style=Semibold Italic:variable=False
SF Pro:style=Black:variable=False
SF Pro:style=Regular Italic:variable=False
SF Pro:style=Thin Italic:variable=False
SF Pro:style=Bold:variable=False
SF Pro:style=Heavy Italic:variable=False
SF Pro:style=Ultralight:variable=False
SF Pro:style=Medium:variable=False
SF Pro:style=Light:variable=False
SF Pro:style=Ultralight Italic:variable=False
SF Pro:style=Regular:variable=False
SF Pro:style=Bold Italic:variable=False
SF Pro:style=Semibold:variable=False
SF Pro:style=Medium Italic:variable=False

There appears to be a bug in the variable font handling code. Variable font implementation is naive, and I haven't tested it against many files. Could you please send me a copy of that font file, if possible?

(I may add a config to completely disable the variable font support though.)

Please test the new version to see if the problem has been resolved. Thanks.

Absolutely wonderful. I saw you changed something to do with how you are de-serializing the font,would love to know what the issue was if you don't mind.

Btw let me tell you this, by porting this Figma font service and with this variable font service, you have literally made it possible for me to completely switch over to POP OS for daily driving and doing production UI design work. A big thank you for this wonderful work @latin-1 ❤️

I'm glad to hear that! cheers!

would love to know what the issue was if you don't mind.

Sure. I misinterpreted what index=0 meant in the fontconfig result. It should be the default instance rather than the first MM var instance. The default style name and all axes' default values should be used.