Created
January 16, 2022 10:41
-
-
Save le0nidas/f34a21fde75b92467629c691ccd3fe33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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