Change font mid-game

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
Kosmo
Newbie
Posts: 8
Joined: Sat Jun 13, 2020 6:20 pm
Contact:

Change font mid-game

#1 Post by Kosmo » Sat Jun 13, 2020 6:23 pm

In gui.rpy I changed text font with preference:

Code: Select all

define gui.text_font = gui.preference("font", "fonts/BalsamiqSans-Regular.ttf")
In game I try to change this preference like this:

Code: Select all

$ gui.SetPreference("font", "fonts/Lobster-Regular.ttf")
But the font doesn't change. No errors. Both fonts are in "fonts" folder. What may be the problem here?

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Change font mid-game

#2 Post by isobellesophia » Sun Jun 14, 2020 10:30 am

I am a friendly user, please respect and have a good day.


Image

Image


Kosmo
Newbie
Posts: 8
Joined: Sat Jun 13, 2020 6:20 pm
Contact:

Re: Change font mid-game

#3 Post by Kosmo » Mon Jun 15, 2020 12:28 pm

I know this, but tag works only for one line of dialogue.
I am looking for a way to change font for big chunk of game.

Post Reply

Who is online

Users browsing this forum: Google [Bot]