encoding='big5' throw OSError: invalid argument #5684
Answered
by
radarhere
wanghaisheng
asked this question in
Q&A
-
# create an image
out = Image.new("RGB", (150, 100), (255, 255, 255))
# get a font
fnt = ImageFont.truetype("image/default/TW-Kai-Plus-98_1_format.TTF", 40,encoding='big5')
# get a drawing context
d = ImageDraw.Draw(out)
# draw multiline text
d.multiline_text((10,10), "叫做防老抗衰有一套 跟著中醫來養生\n 中醫養生呢是千百年來", font=fnt, fill=(0, 0, 0))
out.show()
I have tried to convert font using fontforge and online tools, all failed. |
Beta Was this translation helpful? Give feedback.
Answered by
radarhere
Aug 24, 2021
Replies: 1 comment
-
If I install https://github.com/fonttools/fonttools and try to convert these fonts to TTX to find out more information, this font causes Perhaps it is corrupted? |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
radarhere
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I install https://github.com/fonttools/fonttools and try to convert these fonts to TTX to find out more information, this font causes
OverflowError: timestamp out of range for platform time_t
.Perhaps it is corrupted?