Increase font boldness, color rune

This commit is contained in:
spengreb 2021-02-06 15:55:58 +01:00
parent ed538fae27
commit 373d15c542

View file

@ -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()