mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
Added option for system font
This commit is contained in:
@@ -123,7 +123,7 @@ public class FontManager {
|
||||
// Otherwise, get the heavy font weight.
|
||||
if (fontWeight == TypefaceManager.TextWeight.LIGHT) {
|
||||
return TypefaceManager.TextWeight.NORMAL;
|
||||
} else if (fontFamily == TypefaceManager.FontFamily.ROBOTO || fontFamily == TypefaceManager.FontFamily.LATO) {
|
||||
} else if (fontFamily == TypefaceManager.FontFamily.ROBOTO) {
|
||||
return TypefaceManager.TextWeight.MEDIUM;
|
||||
} else {
|
||||
return TypefaceManager.TextWeight.BOLD;
|
||||
|
||||
@@ -23,8 +23,10 @@ public class TypefaceManager {
|
||||
public static android.graphics.Typeface obtainTypeface(int fontFamily, int textWeight) throws IllegalArgumentException {
|
||||
int typeface = Typefaces.ROBOTO_REGULAR;
|
||||
switch (fontFamily) {
|
||||
case FontFamily.SYSTEM_FONT:
|
||||
break;
|
||||
|
||||
case FontFamily.ROBOTO:
|
||||
case FontFamily.LATO:
|
||||
switch (textWeight) {
|
||||
case TextWeight.NORMAL:
|
||||
typeface = Typefaces.ROBOTO_REGULAR;
|
||||
@@ -94,9 +96,9 @@ public class TypefaceManager {
|
||||
}
|
||||
|
||||
public class FontFamily {
|
||||
public static final int ROBOTO = 0;
|
||||
public static final int ROBOTO_CONDENSED = 1;
|
||||
public static final int LATO = 2;
|
||||
public static final int SYSTEM_FONT = 0;
|
||||
public static final int ROBOTO = 1;
|
||||
public static final int ROBOTO_CONDENSED = 2;
|
||||
}
|
||||
|
||||
public class TextWeight {
|
||||
|
||||
Reference in New Issue
Block a user