tangning 4 dni temu
rodzic
commit
bc80a58a35
2 zmienionych plików z 5 dodań i 5 usunięć
  1. 4 4
      src/view/case/photos/canvas-photo-editor.js
  2. 1 1
      vite.config.ts

+ 4 - 4
src/view/case/photos/canvas-photo-editor.js

@@ -1034,7 +1034,7 @@ export class CanvasPhotoEditor {
     ctx.fillStyle = '#8C8C8C';
     ctx.fillStyle = '#8C8C8C';
     let textX = layout.width //textWidth > (this.rqWidth / 2) ? drawX : drawX + (textWidth / 2)
     let textX = layout.width //textWidth > (this.rqWidth / 2) ? drawX : drawX + (textWidth / 2)
     // ctx.fillText(text, jxx + textWidth + (layout.width / 2), itemY + layout.height + 30, layout.width);
     // ctx.fillText(text, jxx + textWidth + (layout.width / 2), itemY + layout.height + 30, layout.width);
-    this.drawCenteredTextWithEllipsis(ctx, text, jxx + (this.rqWidth / 2), itemY + layout.height + 40, 24, 2, '16px Microsoft Yahei')
+    this.drawCenteredTextWithEllipsis(ctx, text, jxx + (this.rqWidth / 2), itemY + layout.height + 40, 24, 2)
     ctx.fillStyle = 'rgba(0, 0, 0, 1)'; // 半透明黑色背景
     ctx.fillStyle = 'rgba(0, 0, 0, 1)'; // 半透明黑色背景
     ctx.setLineDash([1, 1]);
     ctx.setLineDash([1, 1]);
     ctx.strokeRect(
     ctx.strokeRect(
@@ -1398,7 +1398,7 @@ resizePageAndReflow(pages, pageIndex, itemValue) {
    * @param {number} maxLines - 最大显示行数(超出显示省略号)
    * @param {number} maxLines - 最大显示行数(超出显示省略号)
    * @param {string} font - 字体样式(如 '16px Microsoft Yahei')
    * @param {string} font - 字体样式(如 '16px Microsoft Yahei')
    */
    */
-  drawCenteredTextWithEllipsis(ctx, text, x, y, lineHeight, maxLines, font = '16pt 仿宋_GB2312') {
+  drawCenteredTextWithEllipsis(ctx, text, x, y, lineHeight, maxLines, font = '16px "FangSong_GB2312"') {
     // 1. 设置字体样式(必须先设置,否则measureText计算不准确)
     // 1. 设置字体样式(必须先设置,否则measureText计算不准确)
     let maxWidth = this.rqWidth - 20
     let maxWidth = this.rqWidth - 20
     ctx.font = font;
     ctx.font = font;
@@ -1623,7 +1623,7 @@ resizePageAndReflow(pages, pageIndex, itemValue) {
                 ctx, text,
                 ctx, text,
                 coord.x + coord.width / 2,
                 coord.x + coord.width / 2,
                 coord.y + coord.height + 40,
                 coord.y + coord.height + 40,
-                24, 2, "14pt 宋体"
+                24, 2
               );
               );
 
 
               // 虚线框
               // 虚线框
@@ -1793,7 +1793,7 @@ resizePageAndReflow(pages, pageIndex, itemValue) {
                 ctx, text,
                 ctx, text,
                 coord.x + coord.width / 2,
                 coord.x + coord.width / 2,
                 coord.y + coord.height + 40,
                 coord.y + coord.height + 40,
-                24, 2, "14pt 宋体"
+                24, 2
               );
               );
 
 
               // ctx.setLineDash([1, 1]);
               // ctx.setLineDash([1, 1]);

+ 1 - 1
vite.config.ts

@@ -106,7 +106,7 @@ export default defineConfig({
         target: url + "/oss",
         target: url + "/oss",
         changeOrigin: true,
         changeOrigin: true,
         secure: false,
         secure: false,
-        rewrite: (path) => path.replace(new RegExp(`^/oss`), ""),
+        // rewrite: (path) => path.replace(new RegExp(`^/oss`), ""),
       },
       },
       "/laser": {
       "/laser": {
         target: dev
         target: dev