代码如下:
import './js/libs/weapp-adapter'
import './js/libs/symbol'
const screenWidth = window.innerWidth
const screenHeight = window.innerHeight
wx.setEnableDebug({
enableDebug: true,
});
const ctx = canvas.getContext('2d')
const start = () => {
requestAnimationFrame(() => {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = '#ffffff'
ctx.font = '40px Arial'
ctx.fillText(
'正常字体',
0,
screenHeight / 2 - 100 + 50
)
ctx.font = 'bold 40px Arial'
ctx.fillText(
'加粗字体',
screenWidth / 2 ,
screenHeight / 2 - 100 + 50
)
start()
})
}
start()
安卓上表现:
ios中的表现:
安卓测试环境:vivo Y3、微信8.0.3(其它型号的安卓机也测试过,加粗也无效)
ios测试环境:iphonexs、微信8.0.2
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。