Browse Source

Pull request #1804: BI-82230 fix: 插入参数image字体

Merge in VISUAL/fineui from ~IMP/fineui_fui:master to master

* commit 'c68f3bedbdd0f627b798c29fa888e1d9c9816c39':
  BI-82230 fix: 插入参数image字体
es6
imp 4 years ago
parent
commit
203457a675
  1. 4
      src/core/platform/web/dom.js

4
src/core/platform/web/dom.js

@ -127,11 +127,11 @@
BI.Widget._renderEngine.createElement("body").append(canvas);
var ctx = canvas.getContext("2d");
ctx.font = "12px Georgia";
ctx.font = "12px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
var w = ctx.measureText(param).width + 4;
canvas.width = w * ratio;
canvas.height = 16 * ratio;
ctx.font = 12 * ratio + "px Georgia";
ctx.font = 12 * ratio + "px Helvetica Neue,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Heiti,黑体,sans-serif";
ctx.fillStyle = fillStyle || "#3685f2";
ctx.textBaseline = "middle";
// ctx.fillStyle = "#EAF2FD";

Loading…
Cancel
Save