title: OSError: cannot open resource
body: <pre><code>import tkinter as tk  
  from tkinter import ttk,font  
  from PIL import Image,ImageDraw,ImageFont
  
  root = tk.Tk()
  
  def func_image():  
      image = Image.open(r'E:\side_300.png')  
      font_type_1 = ImageFont.truetype(str(combo.get()),18)
      draw = ImageDraw.Draw(image)  
      draw.text((50,50),text='Hello',fill='red',font=font_type_1)  
      image.show()  
  
  fonts=list(font.families())  
  fonts.sort()  
  combo = ttk.Combobox(root,value=fonts)    
  combo.pack()  
  
  btn = ttk.Button(root,text='Click Me',command=func_image)  
  btn.pack()
  
  root.mainloop()
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <blockquote>
    <p>Exception in Tkinter callback<br>
    Traceback (most recent call last):<br>
    File "C:\Users\Mevada\AppData\Local\Programs\Python\Python37\lib\tkinter__init__.py", line 1702, in __call__return self.func(*args)<br>
    File "test.py", line 9, in func_image<br>
    font_type_1 = ImageFont.truetype(str(combo.get()),18)<br>
    File "C:\Users\Mevada\AppData\Local\Programs\Python\Python37\lib\site-packages\PIL\ImageFont.py", line 280, in truetype return FreeTypeFont(font, size, index, encoding, layout_engine)<br>
    File "C:\Users\Mevada\AppData\Local\Programs\Python\Python37\lib\site-packages\PIL\ImageFont.py", line 145, in __init__layout_engine=layout_engine)<br>
    OSError: cannot open resource</p>
  </blockquote>
  
  <p><strong>Thanks...</strong></p>