FontAwesome图标与fabricJS

时间:2017-05-12 11:30:49

标签: font-awesome fabricjs

我正在尝试在FabricJs文本对象上使用FontAwesome图标,但无法使其呈现图标。它适用于同一页面上的常规画布。 我的代码:

       const text = new fabric.IText('\uf0c2',{
        left: this.centerX, //Take the block's position
        top: this.centerY,
        fill: 'white',
        originX: 'center', originY: 'center',
        fontSize:60,
        fontFamily:'FontAwesome',
        selectable: false
    });

结果是一个白色矩形(应该是一个云图标)。 有没有办法将FontAwesome图标与fabricJS一起使用?

0 个答案:

没有答案
相关问题