From 348a01b4c1f0a42cbc70d4ab48149b70c8a10cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Mon, 4 Apr 2022 11:08:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dttf=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/component/menubar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/component/menubar.py b/source/component/menubar.py index 7ad38e5..69c0328 100755 --- a/source/component/menubar.py +++ b/source/component/menubar.py @@ -28,8 +28,8 @@ plant_frozen_time_list = [7500, 7500, 7500, 30000, 50000, 7500, 7500, 7500, 7500 all_card_list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] def getSunValueImage(sun_value): - # for pack, must use other ttf - fontPath = os.path.join('resources', 'freesansbold.ttf') + # for pack, must include ttf + fontPath = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))),'resources', 'freesansbold.ttf') font = pg.font.Font(fontPath, 14) width = 32 msg_image = font.render(str(sun_value), True, c.NAVYBLUE, c.LIGHTYELLOW)