-
Hii, could someone help me out with something a bit silly? I'm trying to dynamically bold text, and for that I can't use ImageDraw.multiline_text, so I'm basically implementing it from scratch. However, I can't seem to get the distance between lines to be the same as the multiline_text method, and I have no idea which method I'm supposed to use to calculate it (I've tried several). Some images which demonstrate the issue: with compared with Here's the script I'm using (relevant part @ line 70): I'm kinda new to this so if you have any pointers for why it isn't working I'd appreciate it a lot :D |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Replace v_offset += font.getbbox(line)[3] with v_offset += font.getbbox("A")[3] + 4 to better mirror Lines 387 to 394 in ef7e1ee |
Beta Was this translation helpful? Give feedback.
Replace
with
to better mirror
Pillow/src/PIL/ImageDraw.py
Lines 387 to 394 in ef7e1ee