Exception: Could not find font... Error on Windows only.

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
gabowave
Newbie
Posts: 10
Joined: Sat Jul 08, 2023 4:15 pm
Contact:

Exception: Could not find font... Error on Windows only.

#1 Post by gabowave »

Hey all, I am currently puzzled by an issue that is plaguing my game. I have no clue what to do about it..

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/reusable.rpy", line 96, in script
    $ renpy.pause(hard=True)
  File "game/reusable.rpy", line 96, in <module>
    $ renpy.pause(hard=True)
Exception: Could not find font 'Ronysiswadi16.ttf'.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/reusable.rpy", line 96, in script
    $ renpy.pause(hard=True)
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\ast.py", line 1131, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\python.py", line 1061, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/reusable.rpy", line 96, in <module>
    $ renpy.pause(hard=True)
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\exports.py", line 1537, in pause
    rv = renpy.ui.interact(mouse='pause', type='pause', roll_forward=roll_forward, pause=delay, pause_modal=modal)
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\ui.py", line 299, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\display\core.py", line 3377, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, pause_modal=pause_modal, **kwargs) # type: ignore
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\display\core.py", line 3912, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\display\core.py", line 2602, in draw_screen
    surftree = renpy.display.render.render_screen(
  File "render.pyx", line 495, in renpy.display.render.render_screen
  File "render.pyx", line 266, in renpy.display.render.render
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\display\layout.py", line 884, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 266, in renpy.display.render.render
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\display\layout.py", line 884, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 266, in renpy.display.render.render
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\display\layout.py", line 884, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 266, in renpy.display.render.render
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\display\screen.py", line 704, in render
    child = renpy.display.render.render(self.child, w, h, st, at)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 266, in renpy.display.render.render
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\display\layout.py", line 884, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 266, in renpy.display.render.render
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\display\layout.py", line 1105, in render
    surf = render(d, width - x, rh, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 266, in renpy.display.render.render
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\text\text.py", line 2109, in render
    virtual_layout = Layout(self, width, height, renders, drawable_res=False, size_only=True)
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\text\text.py", line 656, in __init__
    glyphs = ts.glyphs(s, self)
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\text\text.py", line 255, in glyphs
    fo = font.get_font(self.font, self.size, self.bold, self.italic, 0, self.antialias, self.vertical, self.hinting, layout.oversample)
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\text\font.py", line 717, in get_font
    face = load_face(fn)
  File "C:\Users\joscr\OneDrive\Documents\RENPY 8.0.3\renpy\text\font.py", line 658, in load_face
    raise Exception("Could not find font {0!r}.".format(orig_fn))
Exception: Could not find font 'Ronysiswadi16.ttf'.

Windows-10-10.0.22621 AMD64
Ren'Py 8.0.3.22090809
Rockwood 0.18v "Startup[WIP]"
Tue Jul 11 00:38:52 2023
BTW, The font in question is installed in the game folder


But, while on my Mac OS computer the code runs perfectly fine. This issue seems to be specific to windows. I have replicated the issues on another windows computer and it is not unique to my pc.

My only guess is that this issue could have something to do with OneDrive. But I'm not certain. Another thing could be that the Ren'Py running on my Mac is 8.1.1 while the one running on my PC is 8.0.3 and I have yet to troubleshoot any potential differences. If anyone can help me figure this out it would be awesome Thanks.
Attachments
It's installed in the game files.
It's installed in the game files.

gabowave
Newbie
Posts: 10
Joined: Sat Jul 08, 2023 4:15 pm
Contact:

Re: Exception: Could not find font... Error on Windows only.

#2 Post by gabowave »

Fixed it, it was version specific. I downloaded version 8.1.1 of Ren'Py on my PC and the issue did not present itself anymore. If anyone ever has this issue, just make sure you update your Ren'Py sdk to the most recent version that you've been working on in all machines in order to minimize errors like this.

Post Reply

Who is online

Users browsing this forum: No registered users