i want to set the size of text but am unable to do so, the original text_size() is not implemented and if i create a font with size , i get this error
WARNING: Traceback (most recent call last):
File "/home/abbas/Desktop/Untitled Document.py", line 13, in <module>
run()
File "/home/abbas/.local/lib/python3.6/site-packages/p5/sketch/userspace.py", line 146, in run
app.run()
File "/home/abbas/.local/lib/python3.6/site-packages/vispy/app/_default_app.py", line 62, in run
return default_app.run()
File "/home/abbas/.local/lib/python3.6/site-packages/vispy/app/application.py", line 142, in run
return self._backend._vispy_run()
File "/home/abbas/.local/lib/python3.6/site-packages/vispy/app/backends/_glfw.py", line 194, in _vispy_run
self._vispy_process_events()
File "/home/abbas/.local/lib/python3.6/site-packages/vispy/app/backends/_glfw.py", line 183, in _vispy_process_events
timer._tick()
File "/home/abbas/.local/lib/python3.6/site-packages/vispy/app/backends/_glfw.py", line 516, in _tick
self._vispy_timer._timeout()
File "/home/abbas/.local/lib/python3.6/site-packages/vispy/app/timer.py", line 168, in _timeout
count=self.iter_count)
File "/home/abbas/.local/lib/python3.6/site-packages/vispy/util/event.py", line 455, in __call__
self._invoke_callback(cb, event)
File "/home/abbas/.local/lib/python3.6/site-packages/vispy/util/event.py", line 475, in _invoke_callback
self, cb_event=(cb, event))
<< caught exception here: >>
File "/home/abbas/.local/lib/python3.6/site-packages/vispy/util/event.py", line 471, in _invoke_callback
cb(event)
File "/home/abbas/.local/lib/python3.6/site-packages/p5/sketch/base.py", line 150, in on_timer
self.draw_method()
File "/home/abbas/Desktop/Untitled Document.py", line 9, in draw
create_font("arial.ttf", 15)
File "/home/abbas/.local/lib/python3.6/site-packages/p5/core/font.py", line 50, in create_font
_font_family = ImageFont.truetype(name, size)
File "/home/abbas/.local/lib/python3.6/site-packages/PIL/ImageFont.py", line 280, in truetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/home/abbas/.local/lib/python3.6/site-packages/PIL/ImageFont.py", line 145, in __init__
layout_engine=layout_engine)
OSError: cannot open resource
i want to set the size of text but am unable to do so, the original
text_size()
is not implemented and if i create a font with size , i get this errorAnd some repeat stuff
my code: