浏览代码

定时任务

Silent 6 年之前
父节点
当前提交
ac384d8e95
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/Http/Controllers/Admin/SettingController.php
  2. 二进制
      public/fonts/simsun.ttc

+ 3 - 1
app/Http/Controllers/Admin/SettingController.php

@@ -113,7 +113,9 @@ class SettingController extends Controller
             return $this->showWarning('分享文字位置错误');
             return $this->showWarning('分享文字位置错误');
         }
         }
 
 
-        $image = $image->text($text, $pos[0], $pos[1]);
+        $image = $image->text($text, $pos[0], $pos[1], function ($font) {
+            $font->file('fonts/simsun.ttc');
+        });
 
 
         $size = $image->filesize();
         $size = $image->filesize();
 
 

二进制
public/fonts/simsun.ttc