flutter-packages icon indicating copy to clipboard operation
flutter-packages copied to clipboard

Variable font weight files

Open Reprevise opened this issue 4 years ago • 5 comments

Does this plugin support those "VariableFont" files you get when you download fonts from Google Fonts?

If not, it would make life so much easier so you don't have to go through all of your files and checking what font weights you use and then go and drag (possibly) a lot of files, into the google_fonts folder.

Reprevise avatar Mar 15 '20 13:03 Reprevise

I just added a variable font to my app and it appears to be working properly.

Edit - doesn't look like bold is being picked up.

Jethro87 avatar Apr 16 '20 21:04 Jethro87

I have been able to load the font but see no way to actually set the weight apart from the levels defined by FontWeight. For instance, I can't set the weight to 450.

mentoc3000 avatar Jul 05 '20 17:07 mentoc3000

I found that just leaving the weight out of pubspec.yaml worked for me with a font ending with -VariableFont_wght.ttf

p.s. Apparently fonts from fonts.google.com lose "Font Features", perhaps to save space.

https://medium.com/flutter-community/font-features-in-flutter-320222fc171d

elansys-kc avatar Jul 07 '20 21:07 elansys-kc

Any update on this? Or instructions for how to use a fontweight like 450?

gd46 avatar Apr 18 '22 23:04 gd46

Up ?

LHARISMENDY avatar Jan 31 '24 15:01 LHARISMENDY