Ask coding questions

← Back to all posts
Download the roboto truefont from github.
Yoplayer1py (5)

Hi guys;
I was testing image overlay for my discord bot but when I run the function test_2() it shows that roboto truefont ttf file was not found:

Traceback (most recent call last):
  File "", line 21, in <module>
  File "", line 14, in test_2
    font = ImageFont.truetype('Roboto-Bold.ttf', size=45)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/PIL/", line 853, in truetype
    return freetype(font)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/PIL/", line 850, in freetype
    return FreeTypeFont(font, size, index, encoding, layout_engine)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/PIL/", line 209, in __init__
    self.font = core.getfont(
OSError: cannot open resource

so when I clone it from GitHub using : git clone

it shows:

Cloning into 'roboto'...
fatal: repository '' not found

So if I want to download it do I need to copy and paste all file contents?

Thanks in advance!