-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Default font with provided font size? #2695
Comments
No, the default font is a bitmapped font with no alternate sizes. |
There is still no workaround or anything for this? It would be nice if Pillow provided a default font that "just works" and you were able to set a font size for it. |
Right now PIllow doesn't ship with a font that can be resized. You probably already have a library that ships with one, so you could just load that. For example: import os
import cv2
font_path = os.path.join(cv2.__path__[0],'qt','fonts','DejaVuSans.ttf')
font = ImageFont.truetype(font_path, size=128) |
For those seeking a default font that can change sizes, #6622 has been created as a request for that. |
There are at least two ways to get a font, either loading from default or reading from a file, such as:
I am wondering if there is any way that I can use the default font with a given font size, such as:
to save myself the trouble of providing a font file while being able to change the font size.
The text was updated successfully, but these errors were encountered: