Beginner Trying to Change Fonts

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
dueceladouce
Regular
Posts: 54
Joined: Sun Dec 27, 2015 7:16 pm
Location: Michigan
Contact:

Beginner Trying to Change Fonts

#1 Post by dueceladouce »

I'm trying to change the font for the game but can't get it to work. I've put the .ttf file in the game directory and changed the gui code accordingly, but the default font is being used instead. I know I'm missing something and have read through the documentation a couple times now and am clueless to where I messed up. Does the .ttf file have to go somewhere specific? Is this a failsafe for if the font doesn't work? I'm at a total loss.

Will work in exchange for fight game buddies.

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: Beginner Trying to Change Fonts

#2 Post by Per K Grok »

dueceladouce wrote: Wed Mar 09, 2022 3:35 pm I'm trying to change the font for the game but can't get it to work. I've put the .ttf file in the game directory and changed the gui code accordingly, but the default font is being used instead. I know I'm missing something and have read through the documentation a couple times now and am clueless to where I messed up. Does the .ttf file have to go somewhere specific? Is this a failsafe for if the font doesn't work? I'm at a total loss.

My guess is that the problem is in this part "changed the gui code accordingly", though I'm unclear on what you done wrong, that would not result in an error message.


I will generally for neatness make a subfolder for fonts in the gamefolder.

To use a font I would then do this

## Fonts and Font Sizes ########################################################

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


The program will look in the game folder but not go into subfolders unless that is included in your definition.

I don't think this is the problem you have since that would generate an error message


One possibility could be that you have not saved the change in the gui file and that the program runs the unchanged version.

User avatar
dueceladouce
Regular
Posts: 54
Joined: Sun Dec 27, 2015 7:16 pm
Location: Michigan
Contact:

Re: Beginner Trying to Change Fonts

#3 Post by dueceladouce »

I did get it working so I probably just missed something dumb along the way. I will start using a subfolder for fonts though since that's a real good idea. Plus, that way my tomfoolery doesn't amount to nothing. One of these days I'll figure this coding thing out.

Will work in exchange for fight game buddies.

Post Reply

Who is online

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