[SOLVED] I can't change the font

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
User avatar
Cotton Blue
Regular
Posts: 117
Joined: Fri May 22, 2015 11:48 am
Projects: メモリーズ~ 女神の保護者
Organization: Cotton Blue
Deviantart: CottonBlueVN
Soundcloud: Cotton Blue
itch: Cotton Blue
Location: Chile
Contact:

[SOLVED] I can't change the font

#1 Post by Cotton Blue »

Hello!

I have a very silly problem, I hope you can help me ;;

Code: Select all

define gui.text_font = "Segoe UI.ttf"

define gui.name_text_font = "Segoe UI.ttf"

define gui.interface_text_font = "Segoe UI.ttf"
I want the font "Segoe UI" for my vn, but when I run the game, I get this error:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
Exception: Could not find font u'game/Segoe UI.ttf'.

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

Full traceback:
  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script
    python hide:
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\ast.py", line 896, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\python.py", line 1929, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in <module>
    python hide:
  File "renpy/common/_layout/screen_main_menu.rpym", line 35, in _execute_python_hide
    ui.interact()
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\ui.py", line 289, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2687, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\core.py", line 3171, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2083, in draw_screen
    renpy.config.screen_height,
  File "render.pyx", line 516, in renpy.display.render.render_screen
  File "render.pyx", line 244, in renpy.display.render.render
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 669, in render
    child = renpy.display.render.render(self.child, w, h, st, at)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 925, in render
    surf = render(d, width - x, rh, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\behavior.py", line 740, in render
    rv = super(Button, self).render(width, height, st, at)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 1097, in render
    xminimum = max(xminimum, size_groups[size_group].width(width, height, st, at))
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 1041, in width
    rend = i.render(width, height, st, at)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\behavior.py", line 740, in render
    rv = super(Button, self).render(width, height, st, at)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 1124, in render
    st, at)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\text\text.py", line 1981, in render
    virtual_layout = Layout(self, width, height, renders, drawable_res=False, size_only=True)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\text\text.py", line 611, in __init__
    glyphs = ts.glyphs(s, self)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\text\text.py", line 242, 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\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\text\font.py", line 695, in get_font
    face = load_face(fn)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\text\font.py", line 636, in load_face
    raise Exception("Could not find font {0!r}.".format(orig_fn))
Exception: Could not find font u'game/Segoe UI.ttf'.
Help </3
Last edited by Cotton Blue on Sat Mar 16, 2019 4:22 pm, edited 1 time in total.
Memories~ Megami no hogo-sha [GxB] [Fantasy, Romance, Drama, Yōkai]

Image

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: I can't change the font

#2 Post by Per K Grok »

Cotton Blue wrote: Sat Mar 16, 2019 12:44 pm

I want the font "Segoe UI" for my vn, but when I run the game, I get this error:

Code: Select all


Exception: Could not find font u'game/Segoe UI.ttf'.


Help </3
Have you placed the font in the game-folder?

User avatar
Cotton Blue
Regular
Posts: 117
Joined: Fri May 22, 2015 11:48 am
Projects: メモリーズ~ 女神の保護者
Organization: Cotton Blue
Deviantart: CottonBlueVN
Soundcloud: Cotton Blue
itch: Cotton Blue
Location: Chile
Contact:

Re: I can't change the font

#3 Post by Cotton Blue »

Per K Grok wrote: Sat Mar 16, 2019 1:55 pm
Cotton Blue wrote: Sat Mar 16, 2019 12:44 pm

I want the font "Segoe UI" for my vn, but when I run the game, I get this error:

Code: Select all


Exception: Could not find font u'game/Segoe UI.ttf'.


Help </3
Have you placed the font in the game-folder?
Yes! I made sure of that, I even changed the font to all the game directories to see if it was recognizable, but it did not work, so I went back to the /game ;;

EDIT:

I changed the source to the project folder and this error now appears:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00start.rpy", line 203, in script call
    call _load_reload_game from _call__load_reload_game_1
  File "renpy/common/00keymap.rpy", line 448, in script
    python hide:
  File "renpy/common/00keymap.rpy", line 448, in <module>
    python hide:
  File "renpy/common/00keymap.rpy", line 458, in _execute_python_hide
    renpy.load("_reload-2")
Exception: Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?

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

Full traceback:
  File "renpy/common/00start.rpy", line 203, in script call
    call _load_reload_game from _call__load_reload_game_1
  File "renpy/common/00keymap.rpy", line 448, in script
    python hide:
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\ast.py", line 896, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\python.py", line 1929, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/00keymap.rpy", line 448, in <module>
    python hide:
  File "renpy/common/00keymap.rpy", line 458, in _execute_python_hide
    renpy.load("_reload-2")
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\loadsave.py", line 753, in load
    log.unfreeze(roots, label="_after_load")
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\python.py", line 1884, in unfreeze
    self.rollback(0, force=True, label=label, greedy=greedy, on_load=True)
  File "C:\Users\gmnek\Documents\renpy-6.99.12.4-sdk\renpy\python.py", line 1712, in rollback
    raise Exception("Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?")
Exception: Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?
Memories~ Megami no hogo-sha [GxB] [Fantasy, Romance, Drama, Yōkai]

Image

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: I can't change the font

#4 Post by Per K Grok »

Cotton Blue wrote: Sat Mar 16, 2019 2:02 pm

I changed the source to the project folder and this error now appears:

Code: Select all

I'm sorry, but an uncaught exception occurred.


Exception: Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?


That don't sound good.
Not quite sure what you mean by changing the source to the project folder.
The exception seems to have to do with the rollback system not finding points to rollback to. Moving stuff around might be the reason.

Can you change things back to how they where?

User avatar
Cotton Blue
Regular
Posts: 117
Joined: Fri May 22, 2015 11:48 am
Projects: メモリーズ~ 女神の保護者
Organization: Cotton Blue
Deviantart: CottonBlueVN
Soundcloud: Cotton Blue
itch: Cotton Blue
Location: Chile
Contact:

Re: I can't change the font

#5 Post by Cotton Blue »

I could do it!

I had to change the name of the file "Segoe UI.tff" -> "segoe_ui.tff"

In doing so, all other problems were solved.

Thank you

PS: With change of source, I meant to leave the file next to the "game" folder, that is, in the main folder of the project
Memories~ Megami no hogo-sha [GxB] [Fantasy, Romance, Drama, Yōkai]

Image

Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot]