pillow: cyrillic error

The error itself

Ignoring exception in on_member_join
Traceback (most recent call last):
  File "C:\Users\raingm\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 312, in _run_event
    return font.getsize(text, direction, features, language, stroke_width)
  File "C:\Users\raingm\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\ImageFont.py", line 128, in getsize
    return self.font.getsize(text)
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-7: ordinal not in range(256)

Code

from PIL import Image, ImageDraw, ImageFont
image = Image.new("RGBA", (1100, 500), (0, 0, 0, 0))

idraw = ImageDraw.Draw(image)
name = 'фыафыа'
font_40 = ImageFont.truetype("Roboto-Regular.ttf", size = 40)

W, H = (1100, 500)
msg = f"{name}"
w, h = idraw.textsize(msg)
idraw.text(((W-w)/2, 315), msg, fill="cyan", font=font_40)
image.show()
Author: strawdog, 2020-10-14