fix: use Arial Bold on macOS to avoid Helvetica.ttc rendering bugs in Pillow
Made-with: Cursor
This commit is contained in:
@@ -16,6 +16,14 @@ def _get_font(size: int) -> ImageFont.FreeTypeFont:
|
||||
)
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
return ImageFont.truetype("/System/Library/Fonts/Supplemental/Arial Bold.ttf", size)
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
return ImageFont.truetype("/Library/Fonts/Arial Bold.ttf", size)
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
return ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", size)
|
||||
except OSError:
|
||||
|
||||
Reference in New Issue
Block a user