Full list of font families provided with Flutter?

In Flutter we can use TextStyle to provide a desired fontFamily property for the text. While some fontFamily names are obvious and do work (like 'Arial', 'Courier', 'Times' and so on), where's the full list of available options?

The docs (https://api.flutter.dev/flutter/painting/TextStyle/fontFamily.html) don't help.


Solution 1:

I do not think such a list is provided by the Flutter team. The fonts you mention are probably system default fonts. Flutter handles the use of custom fonts with a 'Custom Font Fallback'. Listed below is a tool snippet of how this goes to work:

Snippet

In the following example, any glyphs not present in the font Raleway will be attempted to be resolved with Noto Sans CJK SC, and then with Noto Color Emoji:


const TextStyle(
    fontFamily: 'RaleWay',
    fontFamilyFallback: <String>[
        'Noto Sans CJK SC',
        'Noto Color Emoji',
    ],
)

If all custom fallback font families are exhausted and no match was found or no custom fallback was provided, the platform font fallback will be used.

Since you do not provide any FallBack fonts, Flutter automatically uses the the fonts default to your system of choice.

I hope this you understand what happens now! Please look at the documentation on how to add custom fonts:

Flutter font documentation