Browse Source

BI-82230 fix: 插入参数image字体

master
imp 4 years ago
parent
commit
cf6e156253
  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