如何通过fillText()方法将icomoons中的图标添加到canvas中?
ctx.font = '10px';
ctx.fillText = 'white';
ctx.fillText(??);
最佳答案
很可能您首先必须链接您的图标包。
我相信你会这样称呼图标:
ctx.fillText('\uF047');
应将 F047 替换为您的图标代码。
您可能必须在字符代码前加上 Unicode 前缀 (\u)
关于javascript - 如何将 icomoon 图标添加到 Canvas ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46950447/