fix: font-weight

This commit is contained in:
CPPAlien 2021-01-07 16:54:47 +08:00
parent 18c539645b
commit fe55b40129

View File

@ -211,8 +211,8 @@ export default class Painter {
textArray[i] = ' '; textArray[i] = ' ';
} }
} }
const fontWeight = view.css.fontWeight === 'bold' ? 'bold' : 'normal'; const fontWeight = view.css.fontWeight || '400';
const textStyle = view.css.textStyle === 'italic' ? 'italic' : 'normal'; const textStyle = view.css.textStyle || 'normal';
if (!view.css.fontSize) { if (!view.css.fontSize) {
view.css.fontSize = '20rpx'; view.css.fontSize = '20rpx';
} }