Page 1 of 1

Multilanguage support with multiple fonts (changing styles)

Posted: Sun Nov 07, 2010 2:44 am
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

Re: Multilanguage support with multiple fonts (changing styl

Posted: Sun Nov 07, 2010 7:04 am
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!)