mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
FIX: Buttons become boldy in android
This commit is contained in:
@@ -147,14 +147,20 @@ function createTypeface(font: Font): android.graphics.Typeface {
|
||||
|
||||
default:
|
||||
result = loadFontFromFile(fonts[i]);
|
||||
if (fontStyle) {
|
||||
if (result && fontStyle) {
|
||||
result = android.graphics.Typeface.create(result, fontStyle);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Found font!
|
||||
if (result) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (fontStyle && !result) {
|
||||
if (!result) {
|
||||
// fallback to sans-serif font with weight and style
|
||||
result = android.graphics.Typeface.create("sans-serif" + getFontWeightSuffix(font.fontWeight), fontStyle);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user