Exception: could not find font [SOLVED]

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
ghostlyfraggle
Newbie
Posts: 4
Joined: Sat Oct 28, 2017 10:56 am
Tumblr: ghostlyfraggle
Contact:

Exception: could not find font [SOLVED]

#1 Post by ghostlyfraggle »

I have tried to change the font of the game's text multiple times now. I have checked that the font name is spelled correctly, that it's in the game directory, used shift+D to make sure the game has the correct file path, checked other posts where people had the same issue, etc, to no avail. Here's the error I'm receiving:

I'm sorry, but an uncaught exception occurred.

While running game code:
File "renpy/common/000window.rpy", line 98, in _window_auto_callback
_window_show()
File "renpy/common/000window.rpy", line 60, in _window_show
renpy.with_statement(trans)
Exception: Could not find font u'EspressoDolche.ttf'.

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

Full traceback:
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\bootstrap.py", line 295, in bootstrap
renpy.main.main()
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\main.py", line 487, in main
run(restart)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\main.py", line 147, in run
renpy.execution.run_context(True)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\execution.py", line 761, in run_context
context.run()
File "lib/windows-i686/script.rpyc", line 29, in script
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\ast.py", line 587, in execute
statement_name("say")
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\ast.py", line 43, in statement_name
i(name)
File "renpy/common/000window.rpy", line 98, in _window_auto_callback
_window_show()
File "renpy/common/000window.rpy", line 60, in _window_show
renpy.with_statement(trans)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\exports.py", line 1381, in with_statement
return renpy.game.interface.do_with(trans, paired, clear=clear)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2096, in do_with
clear=clear)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2526, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2883, in interact_core
self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\display\core.py", line 1955, in draw_screen
renpy.config.screen_height,
File "renpy/display/render.pyx", line 427, in renpy.display.render.render_screen (gen\renpy.display.render.c:6806)
rv = render(root, width, height, 0, 0)
File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
rv = d.render(widtho, heighto, st, at)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 693, in render
surf = render(child, width, height, cst, cat)
File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
cpdef render(d, object widtho, object heighto, double st, double at):
File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
rv = d.render(widtho, heighto, st, at)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\display\transition.py", line 361, in render
top = render(self.new_widget, width, height, st, at)
File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
cpdef render(d, object widtho, object heighto, double st, double at):
File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
rv = d.render(widtho, heighto, st, at)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 693, in render
surf = render(child, width, height, cst, cat)
File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
cpdef render(d, object widtho, object heighto, double st, double at):
File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
rv = d.render(widtho, heighto, st, at)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 693, in render
surf = render(child, width, height, cst, cat)
File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
cpdef render(d, object widtho, object heighto, double st, double at):
File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
rv = d.render(widtho, heighto, st, at)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 623, in render
child = renpy.display.render.render(self.child, w, h, st, at)
File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
cpdef render(d, object widtho, object heighto, double st, double at):
File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
rv = d.render(widtho, heighto, st, at)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 693, in render
surf = render(child, width, height, cst, cat)
File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
cpdef render(d, object widtho, object heighto, double st, double at):
File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
rv = d.render(widtho, heighto, st, at)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 1081, in render
st, at)
File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
cpdef render(d, object widtho, object heighto, double st, double at):
File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
rv = d.render(widtho, heighto, st, at)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\text\text.py", line 1732, in render
virtual_layout = Layout(self, width, height, renders, drawable_res=False, size_only=True)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\text\text.py", line 574, in __init__
glyphs = ts.glyphs(s, self)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\text\text.py", line 236, 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\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\text\font.py", line 648, in get_font
face = load_face(fn)
File "C:\Users\Leo\Downloads\renpy-6.99.12.4-sdk\renpy\text\font.py", line 590, in load_face
raise Exception("Could not find font {0!r}.".format(orig_fn))
Exception: Could not find font u'EspressoDolche.ttf'.

Windows-7-6.1.7601-SP1
Ren'Py 6.99.12.4.2187

And here's the only line of code I messed with in regards to font (in gui.rpy):

## The font used for in-game text.
define gui.text_font = "EspressoDolche.ttf"

Help?
Last edited by ghostlyfraggle on Sun Oct 29, 2017 10:48 am, edited 1 time in total.

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: Exception: could not find font

#2 Post by Scribbles »

is the font a .ttf and not something else like .otf? maybe that isn't the right part? otherwise I'm not sure :-/
Image - Image -Image

User avatar
vollschauer
Veteran
Posts: 231
Joined: Sun Oct 11, 2015 9:38 am
Github: vollschauer
Contact:

Re: Exception: could not find font

#3 Post by vollschauer »

Make sure it's in you "YouGame\game\" directory and make sure you type "EspressoDolce.ttf" and not "EspressoDolche.ttf"

ghostlyfraggle
Newbie
Posts: 4
Joined: Sat Oct 28, 2017 10:56 am
Tumblr: ghostlyfraggle
Contact:

Re: Exception: could not find font

#4 Post by ghostlyfraggle »

Scribbles wrote: Sat Oct 28, 2017 11:30 am is the font a .ttf and not something else like .otf? maybe that isn't the right part? otherwise I'm not sure :-/
It's definitely not an .otf, so that's not the issue here

User avatar
vollschauer
Veteran
Posts: 231
Joined: Sun Oct 11, 2015 9:38 am
Github: vollschauer
Contact:

Re: Exception: could not find font

#5 Post by vollschauer »

The issue is your typo ....

ghostlyfraggle
Newbie
Posts: 4
Joined: Sat Oct 28, 2017 10:56 am
Tumblr: ghostlyfraggle
Contact:

Re: Exception: could not find font

#6 Post by ghostlyfraggle »

vollschauer wrote: Sat Oct 28, 2017 12:29 pm The issue is your typo ....
What typo? I don't see a typo

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Exception: could not find font

#7 Post by Donmai »

Open Type fonts (.otf) are okay with Ren'Py.
https://www.renpy.org/doc/html/text.html#fonts
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Exception: could not find font

#8 Post by Donmai »

Have you tried typing espressodolce.ttf, as vollschauer suggested?
Last edited by Donmai on Sat Oct 28, 2017 12:43 pm, edited 2 times in total.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Exception: could not find font

#9 Post by Divona »

ghostlyfraggle wrote: Sat Oct 28, 2017 12:32 pm
vollschauer wrote: Sat Oct 28, 2017 12:29 pm The issue is your typo ....
What typo? I don't see a typo
Is this the font you're trying to use?
https://www.dafont.com/espresso-dolce.font

Code: Select all

Exception: Could not find font u'EspressoDolche.ttf'.
Completed:
Image

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Exception: could not find font

#10 Post by Imperf3kt »

The issue is an errant H in EspressoDolche
It should be EspressoDolce
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: Exception: could not find font

#11 Post by Scribbles »

Donmai wrote: Sat Oct 28, 2017 12:37 pm Open Type fonts (.otf) are okay with Ren'Py.
https://www.renpy.org/doc/html/text.html#fonts
yes they are! I've just had an error b/c I didn't specify correctly so I thought I'd mention it.
Image - Image -Image

ghostlyfraggle
Newbie
Posts: 4
Joined: Sat Oct 28, 2017 10:56 am
Tumblr: ghostlyfraggle
Contact:

Re: Exception: could not find font

#12 Post by ghostlyfraggle »

Imperf3kt wrote: Sat Oct 28, 2017 3:24 pm The issue is an errant H in EspressoDolche
It should be EspressoDolce
OH! I'm dumb. Thanks for putting up with me lol. That was the issue.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]