From 373d15c5424ef0a47ee5dc0a1193ee95aa0eb764 Mon Sep 17 00:00:00 2001 From: spengreb Date: Sat, 6 Feb 2021 15:55:58 +0100 Subject: [PATCH] Increase font boldness, color rune --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 0db2af5..86afb4b 100755 --- a/main.py +++ b/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()