Move fonts used to a fonts folder in the repository
This commit is contained in:
parent
ab5d73a742
commit
85d1cdbe2d
|
@ -1,20 +1,18 @@
|
|||
import aiohttp
|
||||
import datetime
|
||||
import os
|
||||
from shutil import copyfile
|
||||
from io import BytesIO
|
||||
|
||||
from PIL import Image, ImageDraw, ImageFont, ImageOps
|
||||
from . import utilities
|
||||
|
||||
base_path = "images/banner/base"
|
||||
whitneyMedium = "/usr/share/fonts/whitney-medium.ttf"
|
||||
whitneyBold = "/usr/share/fonts/whitney-bold.ttf"
|
||||
whitneyMedium = "../fonts/whitney-medium.ttf"
|
||||
whitneyBold = "../fonts/whitney-bold.ttf"
|
||||
header_height = 125
|
||||
canvas_height = 145
|
||||
banner_background = "{}/bannerTop2.png".format(base_path)
|
||||
banner_bot = "{}/bannerBot.png".format(base_path)
|
||||
|
||||
|
||||
def convert_to_file(img):
|
||||
"""Converts a Pillow image to a file-like object"""
|
||||
new_file = BytesIO()
|
||||
|
@ -24,6 +22,7 @@ def convert_to_file(img):
|
|||
new_file.seek(0)
|
||||
return new_file
|
||||
|
||||
|
||||
async def create_banner(member, image_title, data):
|
||||
"""Creates a banner based on the options passed
|
||||
Paramaters:
|
||||
|
|
BIN
fonts/whitney-bold.ttf
Normal file
BIN
fonts/whitney-bold.ttf
Normal file
Binary file not shown.
BIN
fonts/whitney-medium.ttf
Normal file
BIN
fonts/whitney-medium.ttf
Normal file
Binary file not shown.
Loading…
Reference in a new issue