generated from A-kirami/nonebot-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0d0186
commit 49cab66
Showing
14 changed files
with
161 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
from pathlib import Path | ||
|
||
from PIL import ImageFont | ||
from nonebot_plugin_ocgbot_v2.libraries.globalMessage import font_path | ||
|
||
font = font_path + "qmzl.ttf" | ||
fontWeek, fontList, fontCardStr, fontText, fontPoint = None, None, None, None, None | ||
font = str(Path(font_path) / "qmzl.ttf") | ||
fonts = {} | ||
|
||
|
||
# fontWeek, fontList, fontCardStr, fontText, fontPoint = None, None, None, None, None | ||
|
||
|
||
def font_init(): | ||
global fontWeek, fontList, fontCardStr, fontText, fontPoint | ||
# global fontWeek, fontList, fontCardStr, fontText, fontPoint | ||
# 星期显示字体 | ||
fontWeek = ImageFont.truetype(font, 45) | ||
fonts['fontWeek'] = ImageFont.truetype(font, 45) | ||
# 宜忌显示字体 | ||
fontList = ImageFont.truetype(font, 30) | ||
fonts['fontList'] = ImageFont.truetype(font, 30) | ||
# 卡牌信息字体 | ||
fontCardStr = ImageFont.truetype(font, 40) | ||
fonts['fontCardStr'] = ImageFont.truetype(font, 40) | ||
# 小贴士字体 | ||
fontText = ImageFont.truetype(font, 28) | ||
fonts['fontText'] = ImageFont.truetype(font, 28) | ||
# 点数字体 | ||
fontPoint = ImageFont.truetype(font, 60) | ||
fonts['fontPoint'] = ImageFont.truetype(font, 60) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.