RTEditor/src/main/java/com/onegravity/rteditor/fonts/FontManager.java
public static void preLoadFonts(final Context context) {
        new Thread(() -> {
            synchronized (ASSET_FONTS_BY_NAME) {
                getAssetFonts(context);
            }
            synchronized (SYSTEM_FONTS_BY_NAME) {
                getSystemFonts();
            }
        }).start();
    }
public static void preLoadFonts(final Context context) {
        new Thread(() -> {
            synchronized (ASSET_FONTS_BY_NAME) {
                getAssetFonts(context);
            }
            synchronized (SYSTEM_FONTS_BY_NAME) {
                getSystemFonts();
            }
        }).start();
    }
public static void preLoadFonts ( final Context context ) { new Thread ( ( ) -> { synchronized ( ASSET_FONTS_BY_NAME ) { getAssetFonts ( context ) ; } synchronized ( SYSTEM_FONTS_BY_NAME ) { getSystemFonts ( ) ; } } ) . start ( ) ; }
Use this method to preload fonts asynchronously e.g. when the app starts up.
Use this method to preload fonts asynchronously e . g . when the app starts up .