Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BildKomGit opened this issue Dec 2, 2022 · 1 comment
Open

Comments

@BildKomGit
Copy link

BildKomGit commented Dec 2, 2022

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.

@bigbenhur
Copy link

Hi @BildKomGit

I have the same issue, but only the png is affected: When I open the svg (e.g. in firefox) there is bold and normal text. Only after conversion to png (using the reportlab method suggested on the main qrbill github page) there is only bold text. Using another conversion method (e.g. inkscape) produces a perfect png with bold and normal text.

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants