Open Bengao123 opened 11 months ago
const font2 = path.join(__dirname, './assets/font/font2.ttf'); let textTitle = new FFText({ text: ‘新增的字体’, x: width / 2, y: 380, fontSize: 40 }); textTitle.setColor('#ffffff'); textTitle.setFont(font2);
textTitle.alignCenter(); textTitle.setStyle({ padding: 10 ,width:600});
代码如上,你们有没有遇到呢
对比demo操作呢
这问题确实奇怪,我用ubuntu22.04开始是好的,后来就不行了,我换了24.04目前是好的
const font2 = path.join(__dirname, './assets/font/font2.ttf'); let textTitle = new FFText({ text: ‘新增的字体’, x: width / 2, y: 380, fontSize: 40 }); textTitle.setColor('#ffffff'); textTitle.setFont(font2);
textTitle.alignCenter(); textTitle.setStyle({ padding: 10 ,width:600});
代码如上,你们有没有遇到呢