-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Why not ship with a default font able to change font size in ImageDraw.Draw.text? #6622
Comments
similiar issue in 2017 #2695 |
I think the main reason this has not yet been done are concerns over file size. The current default font has about 6.5KB, but uses 8.7KB due to base64 encoding. Using this website, I found a monospace TrueType font Share Tech Mono that has about 42KB (about 57KB with base64 encoding, ~2.5% of current Pillow wheels) and is licensed under the Open Font License, which might be acceptable for including in Pillow. |
Share Tech Mono is only 16.3KB when converted to WOFF2, if that works. 21.6KB for WOFF. |
WOFF2 support was added to Pillow wheels in 9.4.0, so that would probably be fine: #6562 / python-pillow/pillow-wheels#320 / python-pillow/pillow-wheels#322 |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
In my entirely subjective opinion, Share Tech Mono doesn't look quite "normal". I have instead found Aileron Regular, a CC0 font from https://dotcolon.net/font/aileron. I've created PR #7354 as a possible solution to this. |
What did you do?
Hello, every author of
Pillow
! Thank you create this powerful tool in image processing.I want to draw a text in a image. But I found so inconvenient to change font size. As the default font is unsupported to change font size, I need to download a truetype font file, and define a object
ImageFont
to change font size. Why not shipped with a default font able to change font size inImageDraw.Draw.text
likeopencv
?What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: