I'm working on a Vietnamese translation of my game. I would like to provide both English and Vietnamese in the same game, allowing the user to switch back and forth from the menu. This wouldn't be a problem if I used a font that supported both languages. However, my English font is an sfont, and thus supports only English characters.
So how would I change the main menu, game menu, and in-game menu fonts after the game is already running?
Thanks~
How do you change all fonts after startup?
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.
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.
- ShiraiJunichi
- Miko-Class Veteran
- Posts: 651
- Joined: Sat May 21, 2005 12:28 pm
- Location: University of Utah
- Contact:
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: How do you change all fonts after startup?
It's somewhat hacky, but the easiest way to do this would be to set the styles at runtime, and then call the undocumented renpy.style.rebuild().
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
- x__sinister
- Regular
- Posts: 153
- Joined: Thu Aug 23, 2007 5:34 pm
- Projects: Modus Operandi, Grim
- Contact:
Re: How do you change all fonts after startup?
Well, instead of having it on the menu, you could just translate all the text to your own language, and have the right font, and just have two separate files for the game. That's the way I would do it, but only because I know nothing about Ren'Py. 
- luminarious
- Veteran
- Posts: 353
- Joined: Thu May 01, 2008 1:12 pm
- Projects: Winter, winter
- Location: Estonia
- Contact:
Re: How do you change all fonts after startup?
I thought I saw a list of characters for the SFonts somewhere in the files.. Could the necessary character be simply added to the list, perhaps?
Who is online
Users browsing this forum: No registered users
