mirror of https://github.com/NekoX-Dev/NekoX.git
Disable system default font for pre-21
This commit is contained in:
parent
4a5887d96f
commit
64a26617a2
|
@ -1091,12 +1091,12 @@ public class AndroidUtilities {
|
|||
|
||||
public static Typeface getTypeface(String assetPath) {
|
||||
synchronized (typefaceCache) {
|
||||
if (NekoConfig.typeface == 1) {
|
||||
if (NekoConfig.typeface == 1 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (assetPath.contains("medium") && assetPath.contains("italic")) {
|
||||
return Typeface.create(Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP ? "sans-serif-medium" : "sans-serif", Typeface.ITALIC);
|
||||
return Typeface.create("sans-serif-medium", Typeface.ITALIC);
|
||||
}
|
||||
if (assetPath.contains("medium")) {
|
||||
return Typeface.create(Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP ? "sans-serif-medium" : "sans-serif", Typeface.NORMAL);
|
||||
return Typeface.create("sans-serif-medium", Typeface.NORMAL);
|
||||
}
|
||||
if (assetPath.contains("italic")) {
|
||||
return Typeface.create((Typeface) null, Typeface.ITALIC);
|
||||
|
|
|
@ -570,7 +570,7 @@ public class NekoSettingsActivity extends BaseFragment {
|
|||
chat2Row = rowCount++;
|
||||
settingsRow = rowCount++;
|
||||
hidePhoneRow = rowCount++;
|
||||
typefaceRow = rowCount++;
|
||||
typefaceRow = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ? rowCount++ : -1;
|
||||
transparentStatusBarRow = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M ? rowCount++ : -1;
|
||||
forceTabletRow = rowCount++;
|
||||
openArchiveOnPullRow = rowCount++;
|
||||
|
|
Loading…
Reference in New Issue