Skip to content

Commit

Permalink
refactor: remove unnecessary files
Browse files Browse the repository at this point in the history
  • Loading branch information
thenishantsapkota committed Sep 16, 2022
1 parent 343016b commit bc8e3f9
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 7 deletions.
Binary file removed fonts/DottyShadow.ttf
Binary file not shown.
Binary file removed fonts/RepetitionScrolling.ttf
Binary file not shown.
Binary file removed fonts/patrick.ttf
Binary file not shown.
Binary file removed fonts/square_dot.ttf
Binary file not shown.
Binary file removed fonts/squaredot.ttf
Binary file not shown.
Binary file removed images/certificate.png
Binary file not shown.
9 changes: 2 additions & 7 deletions web_app/utils/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from nepali_datetime import date, datetime
from nepali_datetime import datetime
from PIL import Image, ImageFont, ImageDraw


Expand All @@ -17,9 +17,7 @@ def add_newline(string: str, number_of_words: int = 15) -> str:


poppins_regular = ImageFont.truetype("fonts/regular.ttf", size=40)
square_dot = ImageFont.truetype("fonts/RepetitionScrolling.ttf", size=40)
poppins_bold = ImageFont.truetype("fonts/bold.ttf", size=40)
patrick = ImageFont.truetype("fonts/patrick.ttf", size=50)
revue = ImageFont.truetype("fonts/RevueBT.ttf", size=80)


Expand Down Expand Up @@ -147,10 +145,7 @@ def create_certificate(
x = (image.size[0] - row_length) / 2

for font, segment in row:
if font == square_dot:
draw.text((x, y+10), segment, fill="black", font=font,)
else:
draw.text((x, y), segment, fill="black", font=font)
draw.text((x, y), segment, fill="black", font=font)
x += font.getlength(segment)

y += line_height
Expand Down

0 comments on commit bc8e3f9

Please sign in to comment.