Steps to Reproduce
I am about to use a bundled version of a font, the documentation says:
Note: Since these files are listed as assets, there is no need to list them in the fonts section of the pubspec.yaml. This can be done because the files are consistently named from the Google Fonts API (so be sure not to rename them!)
I did the same for Plus Jakarta Sans with allowRuntimeFetching = false but this lead to the error:
I/flutter ( 9128): Error: google_fonts was unable to load font PlusJakartaSans-Regular because the following exception occurred:
I/flutter ( 9128): Exception: GoogleFonts.config.allowRuntimeFetching is false but font PlusJakartaSans-Regular was not found in the application assets. Ensure PlusJakartaSans-Regular.ttf exists in a folder that is included in your pubspec's assets.
Which makes sense as I don't have PlusJakartaSans-Regular.ttf in the assets but PlusJakartaSans-VariableFont_wght.ttf which is the one you get when downloading from Google Fonts.
Expected results:
The variable font should be used.
Actual results:
It does not get used
Additional context
A workaround for just downloading the regular variant is also not possible, since when you just select the regular style on fonts.google.com also only the variable font is downloaded
https://fonts.google.com/share?selection.family=Plus%20Jakarta%20Sans
Steps to Reproduce
I am about to use a bundled version of a font, the documentation says:
I did the same for
Plus Jakarta SanswithallowRuntimeFetching = falsebut this lead to the error:Which makes sense as I don't have
PlusJakartaSans-Regular.ttfin the assets butPlusJakartaSans-VariableFont_wght.ttfwhich is the one you get when downloading from Google Fonts.Expected results:
The variable font should be used.
Actual results:
It does not get used
Additional context
A workaround for just downloading the regular variant is also not possible, since when you just select the regular style on fonts.google.com also only the variable font is downloaded
https://fonts.google.com/share?selection.family=Plus%20Jakarta%20Sans