fix fonts

This commit is contained in:
Samuel Lazareanu
2023-04-24 17:00:57 +03:00
parent ac835669dc
commit b5de57ef57
4 changed files with 5 additions and 3 deletions

1
.idea/.name generated Normal file
View File

@@ -0,0 +1 @@
main.py

View File

@@ -14,7 +14,8 @@ images_folder = f"{project_dir}/sources/images/{TOPIC}"
images_folder_cropped = f"{images_folder}/cropped" images_folder_cropped = f"{images_folder}/cropped"
images_folder_cropped_darken = f"{images_folder_cropped}/darken" images_folder_cropped_darken = f"{images_folder_cropped}/darken"
text_file = f"{project_dir}/sources/text_data/{TOPIC}.txt" text_file = f"{project_dir}/sources/text_data/{TOPIC}.txt"
font_dir = "C:/Users/samla/AppData/Local/Microsoft/Windows/Fonts/MouldyCheeseRegular-WyMWG.ttf" quote_font = f"{project_dir}/sources/fonts/MouldyCheeseRegular-WyMWG.ttf"
author_font= f"{project_dir}/sources/fonts/MouldyCheeseRegular-WyMWG.ttf"
output_folder = f"{project_dir}/customers/{TOPIC}" output_folder = f"{project_dir}/customers/{TOPIC}"
logo_file = f"{project_dir}/sources/logo.png" logo_file = f"{project_dir}/sources/logo.png"
@@ -27,7 +28,7 @@ if __name__ == "__main__":
# LOGO # LOGO
post_handler.create_posts(images_folder=images_folder_cropped_darken, text_file=text_file, post_handler.create_posts(images_folder=images_folder_cropped_darken, text_file=text_file,
font_dir=font_dir, output_folder=output_folder, quote_font=quote_font, author_font=author_font, output_folder=output_folder,
logo_file=logo_file, customer_name=CUSTOMER_NAME, number_of_posts=NUM_OF_POSTS, show_author=SHOW_AUTHOR) logo_file=logo_file, customer_name=CUSTOMER_NAME, number_of_posts=NUM_OF_POSTS, show_author=SHOW_AUTHOR)
# NO LOGO # NO LOGO

View File

@@ -22,7 +22,7 @@ def create_dirs(output_folder, customer_name):
return output_path return output_path
def create_posts(images_folder, text_file, font_dir, output_folder, customer_name, number_of_posts, logo_file: str = None, show_author : bool = False): def create_posts(images_folder, text_file, quote_font, author_font, output_folder, customer_name, number_of_posts, logo_file: str = None, show_author : bool = False):
run_time_average = 0 run_time_average = 0
if number_of_posts > 1: if number_of_posts > 1:
start_time_total = time.time() start_time_total = time.time()

Binary file not shown.