Upload tools.py
Browse files- Akeno/utils/tools.py +1 -3
Akeno/utils/tools.py
CHANGED
@@ -39,7 +39,6 @@ def global_no_spam_title(message: Message):
|
|
39 |
):
|
40 |
return True
|
41 |
|
42 |
-
|
43 |
async def add_text_img(image_path, text):
|
44 |
font_size = 12
|
45 |
stroke_width = 1
|
@@ -54,7 +53,7 @@ async def add_text_img(image_path, text):
|
|
54 |
img_info = img.info
|
55 |
image_width, image_height = img.size
|
56 |
font = ImageFont.truetype(
|
57 |
-
font="resources/default.ttf",
|
58 |
size=int(image_height * font_size) // 100,
|
59 |
)
|
60 |
draw = ImageDraw.Draw(img)
|
@@ -444,5 +443,4 @@ async def initialize_git(git_repo: str):
|
|
444 |
force = True
|
445 |
with contextlib.suppress(BaseException):
|
446 |
repo.create_remote("upstream", f"https://github.com/{git_repo}")
|
447 |
-
|
448 |
return True, repo, force
|
|
|
39 |
):
|
40 |
return True
|
41 |
|
|
|
42 |
async def add_text_img(image_path, text):
|
43 |
font_size = 12
|
44 |
stroke_width = 1
|
|
|
53 |
img_info = img.info
|
54 |
image_width, image_height = img.size
|
55 |
font = ImageFont.truetype(
|
56 |
+
font="resources/fonts/default.ttf",
|
57 |
size=int(image_height * font_size) // 100,
|
58 |
)
|
59 |
draw = ImageDraw.Draw(img)
|
|
|
443 |
force = True
|
444 |
with contextlib.suppress(BaseException):
|
445 |
repo.create_remote("upstream", f"https://github.com/{git_repo}")
|
|
|
446 |
return True, repo, force
|