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:
@@ -6,10 +6,10 @@
|
||||
"nativescript": {
|
||||
"id": "org.nativescript.apps",
|
||||
"tns-ios": {
|
||||
"version": "2.4.0"
|
||||
"version": "2.5.0"
|
||||
},
|
||||
"tns-android": {
|
||||
"version": "2.4.1"
|
||||
"version": "2.5.0"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -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