Increase font boldness, color rune
This commit is contained in:
parent
ed538fae27
commit
373d15c542
1 changed files with 6 additions and 2 deletions
8
main.py
8
main.py
|
|
@ -32,10 +32,10 @@ def draw_card_face(color, symbol):
|
|||
def draw_symbol(img, symbol, color, x, y):
|
||||
with Drawing() as draw:
|
||||
draw.font = 'DejaVu-Sans-Mono'
|
||||
draw.font_size = 100
|
||||
draw.font_size = 120
|
||||
draw.font_weight = 900
|
||||
draw.stroke_color = Color('black')
|
||||
draw.stroke_width = 3
|
||||
draw.stroke_width = 5
|
||||
draw.text_alignment = 'center'
|
||||
draw.fill_color=Color(color)
|
||||
draw.text(x, y, str(symbol))
|
||||
|
|
@ -45,10 +45,12 @@ def draw_symbol(img, symbol, color, x, y):
|
|||
def draw_rune(img, color):
|
||||
with Image(filename='assets/{}.png'.format(color)) as rune:
|
||||
rune.resize(220,244)
|
||||
rune.opaque_paint(target=Color("white"), fill=Color(color), fuzz=0.66*img.quantum_range)
|
||||
img.composite(
|
||||
rune,
|
||||
left=int((img.width - rune.width) / 2),
|
||||
top=int((img.height - rune.height) / 2))
|
||||
|
||||
return img
|
||||
|
||||
def draw_mask(img, color):
|
||||
|
|
@ -71,5 +73,7 @@ def draw_mask(img, color):
|
|||
def save_img(img, color, symbol):
|
||||
print('Created card {} {}'.format(color, symbol))
|
||||
img.save(filename='output/card-{}-{}.png'.format(color, symbol))
|
||||
|
||||
|
||||
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue