Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Typeface
public static Typeface create(String familyName, @Style int style) {
return create(getSystemDefaultTypeface(familyName), style);
}
private static Typeface getSystemDefaultTypeface(@NonNull String familyName) {
Typeface tf = sSystemFontMap.get(familyName);
return tf == null ? Typeface.DEFAULT : tf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment