-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
BugAny unexpected behavior, until confirmed feature.Any unexpected behavior, until confirmed feature.Font Rendering
Description
What did you do?
- I use pillow to draw font.
What actually happened?
- I observe there are some absence pixels on the top of numbers:
0,2,3,8,9.
What are your OS, Python and Pillow versions?
- OS: win10
- Python: 3.6.1
- Pillow: 7.1.1
from PIL import Image, ImageFont, ImageDraw
ttf_path = "vista-hei-all.ttf"
text = "0123456789"
text_size = 35
font = ImageFont.truetype(ttf_path, text_size)
text_width, text_height = font.getsize(text)
canvas = Image.new("RGBA", [text_width, text_height], (255, 0, 0, 0))
draw = ImageDraw.Draw(canvas)
draw.text((0, 0), text, font=font, fill="#000000")
canvas.show()Metadata
Metadata
Assignees
Labels
BugAny unexpected behavior, until confirmed feature.Any unexpected behavior, until confirmed feature.Font Rendering
