I want to translate an English game into Chinese. But it seems that the parameter what_font in character() cannot be changed in the translate python block, I can only add a font to the parameter that displays both Chinese and English, but I want to display the English font when the language is English and the Chinese is another font.
define l = Character ("Intercom", what_font="font/Trebuchet_MS.ttf", what_size=32, ctc=anim.Blink("images/ctc/ctc.png", xanchor=-7, yanchor=-8), ctc_pause=anim.Blink("images/ctc/ctc.png", xanchor=-7, yanchor=-8), ctc_timedpause=Null(), ctc_position="nestled",what_prefix='"', what_suffix='"')
Re:How to make the parameter what_font in define character() change with the language
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.
Re:How to make the parameter what_font in define character() change with the language
Last edited by xin da ya on Tue Sep 05, 2023 12:10 am, edited 1 time in total.
- Ocelot
- Lemma-Class Veteran
- Posts: 2402
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: How to make the parameter what_font in define character() change with the language
Instead of providing what_font, what_size and other style parameters, I would just define a style for this character text and pass it in what_style argument. Then I would use style tranlations to change styles depending on language.
< < insert Rick Cook quote here > >
Re: How to make the parameter what_font in define character() change with the language
Thank you very much Ocelot!
Who is online
Users browsing this forum: No registered users