Skip to content

Commit 499ff3a

Browse files
loongfayallen-zh
authored andcommitted
fix(api): font style is required when set canvas font (#112)
1 parent 68504d3 commit 499ff3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mars-api/api/canvas/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class Canvas {
139139
}
140140

141141
setFontSize(fontSize) {
142-
this.context.font = fontSize + 'px';
142+
this.context.font = fontSize + 'px normal';
143143
}
144144

145145
fillText(text, x, y, maxWidth) {

0 commit comments

Comments
 (0)