mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-20 11:26:07 +00:00
fix: 错误的加载过程
This commit is contained in:
@@ -6,10 +6,11 @@ import os
|
|||||||
import config
|
import config
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
text_render_font: ImageFont = None
|
||||||
|
|
||||||
if hasattr(config, "blob_message_strategy") and config.blob_message_strategy == "image": # 仅在启用了image时才加载字体
|
if hasattr(config, "blob_message_strategy") and config.blob_message_strategy == "image": # 仅在启用了image时才加载字体
|
||||||
|
use_font = config.font_path if hasattr(config, "font_path") else ""
|
||||||
try:
|
try:
|
||||||
use_font = config.font_path if hasattr(config, "font_path") else ""
|
|
||||||
text_render_font: ImageFont = None
|
|
||||||
|
|
||||||
# 检查是否存在
|
# 检查是否存在
|
||||||
if not os.path.exists(use_font):
|
if not os.path.exists(use_font):
|
||||||
|
|||||||
Reference in New Issue
Block a user