~hecanjog/pippi

f043c762aabaef1d29e61b09bf4c2c1fc2eddead — Erik Schoster 10 months ago d5cf5d5
Upgrade pillow and wheel, use new font API in graph generation
2 files changed, 6 insertions(+), 4 deletions(-)

M pippi/graph.pyx
M requirements.txt
M pippi/graph.pyx => pippi/graph.pyx +4 -2
@@ 116,7 116,7 @@ def write(object data,
            CHI = str(files(pippi).joinpath('chicago.ttf'))
            fontsize = fontsize * upsample_mult
            font = ImageFont.truetype(CHI, fontsize)
            fontwidth, fontheight = font.getsize(label_top)
            fontwidth = font.getlength(label_top)
            fontx = width//2 - (fontwidth//2)
            fonty = 10
            draw.text((fontx, fonty), label_top, font=font, fill=(0, 0, 0, 200))


@@ 125,7 125,9 @@ def write(object data,
            CHI = str(files(pippi).joinpath('chicago.ttf'))
            fontsize = fontsize * upsample_mult
            font = ImageFont.truetype(CHI, fontsize)
            fontwidth, fontheight = font.getsize(label_bottom)
            fontwidth = font.getlength(label_bottom)
            fl, lr, lt, lb = font.getbbox(label_bottom)
            fontheight = lb - lt
            fontx = width//2 - (fontwidth//2)
            fonty = height - int(fontheight*2)
            draw.text((fontx, fonty), label_bottom, font=font, fill=(0, 0, 0, 200))

M requirements.txt => requirements.txt +2 -2
@@ 2,6 2,6 @@ Cython==3.0.0a11
importlib-resources==5.12.0
mido==1.2.10
numpy==1.24.2
Pillow==9.4.0
Pillow==10.1.0
soundfile==0.12.1
wheel==0.40.0
wheel==0.41.3