From 9cae3ec061911fae67fba1da73eedb5a5de6aac7 Mon Sep 17 00:00:00 2001 From: jinye_huang Date: Mon, 4 Aug 2025 13:10:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BA=86=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E7=9A=84=E9=83=A8=E7=BD=B2=E5=92=8C=E6=AF=9B=E7=8E=BB=E7=92=83?= =?UTF-8?q?=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/services/poster.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/api/services/poster.py b/api/services/poster.py index acbc43c..e77cce2 100644 --- a/api/services/poster.py +++ b/api/services/poster.py @@ -911,7 +911,7 @@ class PosterService: "width": canvas_width - 100, "height": 60 if key != 'content' else 120, "fill": config['fill'], - "fontFamily": "Arial, sans-serif", + "fontFamily": "兰亭粗黑简, 微软雅黑, Microsoft YaHei, PingFang SC, Hiragino Sans GB, Arial, sans-serif", "fontWeight": config['fontWeight'], "fontSize": config['fontSize'], "text": text_content, @@ -1100,7 +1100,7 @@ class PosterService: "fill": "#ffffff", "stroke": "#001e50", "strokeWidth": 4, # 与VibrantTemplate一致的描边宽度 - "fontFamily": "Arial Black, sans-serif", + "fontFamily": "兰亭粗黑简, 微软雅黑, Microsoft YaHei, PingFang SC, Hiragino Sans GB, Arial Black, sans-serif", "fontWeight": "bold", "fontSize": title_size, "text": title, @@ -1172,7 +1172,7 @@ class PosterService: "height": subtitle_size + 15, "fill": "#ffffff", "shadow": "rgba(0, 0, 0, 0.7) 2px 2px 5px", - "fontFamily": "Arial, sans-serif", + "fontFamily": "兰亭粗黑简, 微软雅黑, Microsoft YaHei, PingFang SC, Hiragino Sans GB, Arial, sans-serif", "fontWeight": "normal", "fontSize": subtitle_size, "text": slogan, @@ -1297,7 +1297,7 @@ class PosterService: "width": width, "height": font_size + 10, "fill": "#ffffff", - "fontFamily": "Arial, sans-serif", + "fontFamily": "兰亭粗黑简, 微软雅黑, Microsoft YaHei, PingFang SC, Hiragino Sans GB, Arial, sans-serif", "fontWeight": "normal", "fontSize": font_size, "text": f"• {item}", @@ -1330,7 +1330,7 @@ class PosterService: "height": price_size + 20, "fill": "#ffffff", "shadow": "rgba(0, 0, 0, 0.7) 2px 2px 5px", - "fontFamily": "Arial Black, sans-serif", + "fontFamily": "兰亭粗黑简, 微软雅黑, Microsoft YaHei, PingFang SC, Hiragino Sans GB, Arial Black, sans-serif", "fontWeight": "bold", "fontSize": price_size, "text": f"¥{price}", @@ -1379,7 +1379,7 @@ class PosterService: "height": ticket_size + 10, "fill": "#ffffff", "shadow": "rgba(0, 0, 0, 0.5) 1px 1px 3px", - "fontFamily": "Arial, sans-serif", + "fontFamily": "兰亭粗黑简, 微软雅黑, Microsoft YaHei, PingFang SC, Hiragino Sans GB, Arial, sans-serif", "fontWeight": "normal", "fontSize": ticket_size, "text": ticket_type, @@ -1410,7 +1410,7 @@ class PosterService: "width": width // 2, "height": font_size + 5, "fill": "#ffffff", - "fontFamily": "Arial, sans-serif", + "fontFamily": "兰亭粗黑简, 微软雅黑, Microsoft YaHei, PingFang SC, Hiragino Sans GB, Arial, sans-serif", "fontWeight": "normal", "fontSize": font_size, "text": tag, @@ -1434,7 +1434,7 @@ class PosterService: "width": width // 2, "height": font_size + 5, "fill": "#ffffff", - "fontFamily": "Arial, sans-serif", + "fontFamily": "兰亭粗黑简, 微软雅黑, Microsoft YaHei, PingFang SC, Hiragino Sans GB, Arial, sans-serif", "fontWeight": "normal", "fontSize": font_size, "text": pagination, @@ -1576,7 +1576,7 @@ class PosterService: "height": price_size + 20, "fill": "#ffffff", "shadow": "rgba(0, 0, 0, 0.7) 2px 2px 5px", - "fontFamily": "Arial Black, sans-serif", + "fontFamily": "兰亭粗黑简, 微软雅黑, Microsoft YaHei, PingFang SC, Hiragino Sans GB, Arial Black, sans-serif", "fontWeight": "bold", "fontSize": price_size, "text": f"¥{price}", @@ -1606,7 +1606,7 @@ class PosterService: "width": suffix_estimated_width, "height": suffix_size + 5, "fill": "#ffffff", - "fontFamily": "Arial, sans-serif", + "fontFamily": "兰亭粗黑简, 微软雅黑, Microsoft YaHei, PingFang SC, Hiragino Sans GB, Arial, sans-serif", "fontWeight": "normal", "fontSize": suffix_size, "text": suffix_text, @@ -1666,7 +1666,7 @@ class PosterService: "height": ticket_size + 10, "fill": "#ffffff", "shadow": "rgba(0, 0, 0, 0.5) 1px 1px 3px", - "fontFamily": "Arial, sans-serif", + "fontFamily": "兰亭粗黑简, 微软雅黑, Microsoft YaHei, PingFang SC, Hiragino Sans GB, Arial, sans-serif", "fontWeight": "normal", "fontSize": ticket_size, "text": ticket_type,