-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Japanese font glyph with direction "ttb" is drawn to incorrect position #2656
Copy link
Copy link
Closed
Labels
BugAny unexpected behavior, until confirmed feature.Any unexpected behavior, until confirmed feature.Font Rendering
Description
What did you do?
I tried to draw Japanese font glyph by following test code.
from PIL import Image, ImageDraw, ImageFont
txt = Image.new('RGBA', (200,200), (255,255,255,255))
fnt = ImageFont.truetype("GenEiAntiqueN-Medium.otf", 80)
d = ImageDraw.Draw(txt)
d.text((60,20), "あい", font=fnt, fill=(0,0,0,255), direction="ttb")
txt.show()What did you expect to happen?
I expected to get the following image.
What actually happened?
I got the following image.
Glyphs are drawn to deviate to the lower left.
Also, it seems that these glyphs are drawn overlapping.
(It may be better to deal with this after the first problem has been solved..)
The font file using in my code can be got from the following link.
http://okoneya.jp/font/GenEiAntique-3.0.zip
Incidentally, I tried it using other font "ヒラギノ 明朝".
It included in Japanese mac OS. And same problem appear.
So, I think it is not problem with a specific font file.
Please let me know if there are mistake in my code.
What versions of Pillow and Python are you using?
Python 3.6.0
Pillow 4.2.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugAny unexpected behavior, until confirmed feature.Any unexpected behavior, until confirmed feature.Font Rendering

