Taka005 commited on
Commit
3ec7a74
·
1 Parent(s): b5ea086
Files changed (1) hide show
  1. main.py +7 -7
main.py CHANGED
@@ -18,7 +18,7 @@ BASE_IMAGE = Image.open("images/base.png")
18
  MPLUS_FONT = ImageFont.truetype("fonts/MPLUSRounded1c-Regular.ttf", size=16)
19
  BRAND = "TakasumiBOT#7189"
20
 
21
- def drawText(im, ofs, string, font="fonts/MPLUSRounded1c-Regular.ttf", size=16, color=(0, 0, 0, 255), split_len=None, padding=4, auto_expand=False, disable_dot_wrap=False):
22
  ImageDraw.Draw(im)
23
  fontObj = ImageFont.truetype(font, size=size)
24
 
@@ -91,7 +91,7 @@ def make(name, id, content, icon):
91
 
92
  tx = ImageDraw.Draw(img)
93
 
94
- tsize_t = drawText(img, (890, 270), content, size=45, color=(255, 255, 255, 255), split_len=16, auto_expand=True)
95
 
96
  name_y = tsize_t[2] + 40
97
  tsize_name = drawText(img, (890, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
@@ -117,7 +117,7 @@ def colorMake(name, id, content, icon):
117
 
118
  tx = ImageDraw.Draw(img)
119
 
120
- tsize_t = drawText(img, (890, 270), content, size=45, color=(255, 255, 255, 255), split_len=16, auto_expand=True)
121
 
122
  name_y = tsize_t[2] + 40
123
  tsize_name = drawText(img, (890, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
@@ -145,7 +145,7 @@ def reverseMake(name, id, content, icon):
145
 
146
  tx = ImageDraw.Draw(img)
147
 
148
- tsize_t = drawText(img, (390, 270), content, size=45, color=(255, 255, 255, 255), split_len=16, auto_expand=True)
149
 
150
  name_y = tsize_t[2] + 40
151
  tsize_name = drawText(img, (390, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
@@ -171,7 +171,7 @@ def reverseColorMake(name, id, content, icon):
171
 
172
  tx = ImageDraw.Draw(img)
173
 
174
- tsize_t = drawText(img, (390, 270), content, size=45, color=(255, 255, 255, 255), split_len=16, auto_expand=True)
175
 
176
  name_y = tsize_t[2] + 40
177
  tsize_name = drawText(img, (390, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
@@ -197,7 +197,7 @@ def whiteMake(name, id, content, icon):
197
 
198
  tx = ImageDraw.Draw(img)
199
 
200
- tsize_t = drawText(img, (890, 270), content, size=45, color=(0, 0, 0, 0), split_len=16, auto_expand=True)
201
 
202
  name_y = tsize_t[2] + 40
203
  tsize_name = drawText(img, (890, name_y), f"@{name}", size=25, color=(0, 0, 0, 0), split_len=25, disable_dot_wrap=True)
@@ -223,7 +223,7 @@ def reverseWhiteMake(name, id, content, icon):
223
 
224
  tx = ImageDraw.Draw(img)
225
 
226
- tsize_t = drawText(img, (390, 270), content, size=45, color=(0, 0, 0, 0), split_len=16, auto_expand=True)
227
 
228
  name_y = tsize_t[2] + 40
229
  tsize_name = drawText(img, (390, name_y), f"@{name}", size=25, color=(0, 0, 0, 0), split_len=25, disable_dot_wrap=True)
 
18
  MPLUS_FONT = ImageFont.truetype("fonts/MPLUSRounded1c-Regular.ttf", size=16)
19
  BRAND = "TakasumiBOT#7189"
20
 
21
+ def drawText(im, ofs, string, font="fonts/MPLUSRounded1c-Regular.ttf", size=16, color=(0, 0, 0, 255), split_len=None, padding=4, disable_dot_wrap=False):
22
  ImageDraw.Draw(im)
23
  fontObj = ImageFont.truetype(font, size=size)
24
 
 
91
 
92
  tx = ImageDraw.Draw(img)
93
 
94
+ tsize_t = drawText(img, (890, 270), content, size=45, color=(255, 255, 255, 255), split_len=16)
95
 
96
  name_y = tsize_t[2] + 40
97
  tsize_name = drawText(img, (890, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
 
117
 
118
  tx = ImageDraw.Draw(img)
119
 
120
+ tsize_t = drawText(img, (890, 270), content, size=45, color=(255, 255, 255, 255), split_len=16)
121
 
122
  name_y = tsize_t[2] + 40
123
  tsize_name = drawText(img, (890, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
 
145
 
146
  tx = ImageDraw.Draw(img)
147
 
148
+ tsize_t = drawText(img, (390, 270), content, size=45, color=(255, 255, 255, 255), split_len=16)
149
 
150
  name_y = tsize_t[2] + 40
151
  tsize_name = drawText(img, (390, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
 
171
 
172
  tx = ImageDraw.Draw(img)
173
 
174
+ tsize_t = drawText(img, (390, 270), content, size=45, color=(255, 255, 255, 255), split_len=16)
175
 
176
  name_y = tsize_t[2] + 40
177
  tsize_name = drawText(img, (390, name_y), f"@{name}", size=25, color=(255, 255, 255, 255), split_len=25, disable_dot_wrap=True)
 
197
 
198
  tx = ImageDraw.Draw(img)
199
 
200
+ tsize_t = drawText(img, (890, 270), content, size=45, color=(0, 0, 0, 0), split_len=16)
201
 
202
  name_y = tsize_t[2] + 40
203
  tsize_name = drawText(img, (890, name_y), f"@{name}", size=25, color=(0, 0, 0, 0), split_len=25, disable_dot_wrap=True)
 
223
 
224
  tx = ImageDraw.Draw(img)
225
 
226
+ tsize_t = drawText(img, (390, 270), content, size=45, color=(0, 0, 0, 0), split_len=16)
227
 
228
  name_y = tsize_t[2] + 40
229
  tsize_name = drawText(img, (390, name_y), f"@{name}", size=25, color=(0, 0, 0, 0), split_len=25, disable_dot_wrap=True)