Java tutorial
//package com.java2s; import android.graphics.Typeface; import java.util.HashMap; public class Main { private static HashMap<String, Typeface> fonts; public static HashMap<String, Typeface> getFontsMap() { if (fonts == null) { try { throw new Exception( "You should call createFonts method in your application class before using library"); } catch (Exception e) { e.printStackTrace(); } return null; } else { return fonts; } } }