Pillow
Pillow copied to clipboard
Allow default ImageDraw font to be set
Resolves #6480
By raising ImageDraw.ImageDraw.font from an instance variable to a class variable, a default ImageDraw font can be set by the user.
from PIL import ImageDraw, ImageFont
ImageDraw.ImageDraw.font = ImageFont.truetype("Tests/fonts/FreeMono.ttf", 120)
From then on, ImageDraw operations would use that font as the default, instead of the ImageFont.load_default() font.
Ok, done