|
@@ -229,14 +229,24 @@ Page({
|
|
|
// ctx.textBaseline = 'top';
|
|
|
ctx.setFontSize(fontTouch.fontSize);
|
|
|
ctx.setFillStyle(fontTouch.isColor);
|
|
|
- ctx.font = `'bold' ${fontTouch.fontSize} ${fontTouch.isColor} 'sans-serif'`;
|
|
|
+ if(fontTouch.bold){
|
|
|
+ ctx.fillText(fontTouch.fontContent, -1, simulationFont.height / 5 * 4)
|
|
|
+ ctx.fillText(fontTouch.fontContent, 0, simulationFont.height / 5 * 4 -1)
|
|
|
+ }
|
|
|
+ ctx.fillText(fontTouch.fontContent, 0, simulationFont.height / 5 * 4)
|
|
|
+ if (fontTouch.bold) {
|
|
|
+ ctx.fillText(fontTouch.fontContent, 1, simulationFont.height / 5 * 4)
|
|
|
+ ctx.fillText(fontTouch.fontContent, 0, simulationFont.height / 5 * 4 + 1)
|
|
|
+ }
|
|
|
+ ctx.restore()
|
|
|
+ // ctx.font = `'bold' ${fontTouch.fontSize} ${fontTouch.isColor} 'sans-serif'`;
|
|
|
// const metrics = ctx.measureText(fontTouch.fontContent)
|
|
|
// let movex = fontTouch.x + metrics.width / 2;
|
|
|
// let movey = fontTouch.y + simulationFont.height / 2;
|
|
|
// ctx.translate(movex, movey);
|
|
|
// ctx.rotate(fontTouch.angle * Math.PI / 180);
|
|
|
// ctx.fillText(fontTouch.fontContent, -metrics.width / 2, -simulationFont.height / 2 + simulationFont.height / 5 * 4);
|
|
|
- ctx.fillText(fontTouch.fontContent, 0, simulationFont.height / 5 * 4)
|
|
|
+ // ctx.fillText(fontTouch.fontContent, 0, simulationFont.height / 5 * 4)
|
|
|
ctx.draw(false,function () {
|
|
|
wx.canvasToTempFilePath({
|
|
|
canvasId: 'comb-font'+i,
|