Multilanguage support with multiple fonts (changing styles)

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
ShiraiJunichi
Miko-Class Veteran
Posts: 651
Joined: Sat May 21, 2005 12:28 pm
Location: University of Utah
Contact:

Multilanguage support with multiple fonts (changing styles)

#1 Post by ShiraiJunichi »

I would like to put multilanguage support in my game, allowing the user to switch between two languages in the same game. config.translations can be changed at any time, so translating the menu text on the fly isn't a problem.
However, I would like to use different fonts for the different languages (English uses an sfont, which doesn't support non-english characters). Is there any way to change the font after the game is running? Any changes I make to the styles outside of init blocks don't seem to work...
Thanks

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Multilanguage support with multiple fonts (changing styl

#2 Post by Jake »

ShiraiJunichi wrote: However, I would like to use different fonts for the different languages (English uses an sfont, which doesn't support non-english characters).
I don't think you can change style after the init is over, but... you should be able to choose the set of characters you're using for your sFont! If you check the renpy.register_sfont manual page, there's a 'charset' parameter which lists all the characters in the sFont, you should just be able to insert extra non-English characters into that list (and supply them in the font graphic itself, of course)...


(And welcome back - we've not seen you for a while around here!)
Server error: user 'Jake' not found

Post Reply

Who is online

Users browsing this forum: Google [Bot]