claudep / swiss-qr-bill

A Python library to generate Swiss QR-bill payment slips

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Font-Weight on Windows PC (distinction between titles and body)

BildKomGit opened this issue · comments

Only Arial Regular
FontWeight Windows

Hello
I am trying to solve a problem which is not severe since all information is properly put on the bill and any payment transaction will work nevertheless. Either "Arial bold" or "Arial regular" is used for all text on my bill. In version 1.0.0 titles titles are set in "Arial Bold" and body text in "Arial Regular" - not at the moment with my bills on my Windows PC.

Here is what I tried. I am using the new version from Claude which he kindly prepared for me. He added font_family = 'Arial,Helvetica' which solved my problem with Croatian letters (see screenshot). Arial.ttf is installed and works without problems. Changing the font size works also on all styles.

On the screenshot of my code you see that I have set all other types of text to "Arial Bold" (line 392, 397, 401). Nevertheless the drawing is completely without any bold. Whathever I do, the setting on line 388 defines all font weight on my bills. I had been experimenting with ("font_style": "regular"/"normal") and "font_weight" : 400 (for regular) and 700 for bold ... no positive result. I can decide (on line 388) whether all font shall be set in bold or regular.

I googled and in my opinion svgdraw expects these kind of parameters in the form Claude put it. I believe something is overwriting this setting, thought. But this goes beyond my programming skills. Maybe somebody has an answer to my little problem. Have a nice weekend, Patrik.