How to display specific words or phrases in Japanese font when I want it to?

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
kuroshirushi
Newbie
Posts: 4
Joined: Mon Nov 09, 2020 1:22 am
Contact:

How to display specific words or phrases in Japanese font when I want it to?

#1 Post by kuroshirushi » Sat Dec 19, 2020 4:23 pm

Ok so I'm kinda new to ren'py and I'm trying to get my game to display Japanese fonts but only when I want it to. The game is in English but I want a specific word or phrases to be said in Japanese in the dialogue. For example, if I wanted a phrase to be said like "悪因悪果" which means “Evil cause, evil effect” which would be said a few times in the game but is later translated and explained because it bares significance to the story. How do I achieve this? Sorry for the long text and I hope I'm making sense

User avatar
gas
Miko-Class Veteran
Posts: 838
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: How to display specific words or phrases in Japanese font when I want it to?

#2 Post by gas » Sat Dec 19, 2020 4:29 pm

You can use a variable.

Code: Select all

default tense = "悪因悪果"

label start:
    "Beware of this: [tense]"
    $ tense = “Evil cause, evil effect”
    "Well, I was meaning: [tense]"
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: How to display specific words or phrases in Japanese font when I want it to?

#3 Post by Imperf3kt » Sun Dec 20, 2020 7:47 am

You can change fonts anywhere using the font text tag.
https://www.renpy.org/doc/html/text.html#text-tag-font
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

kuroshirushi
Newbie
Posts: 4
Joined: Mon Nov 09, 2020 1:22 am
Contact:

Re: How to display specific words or phrases in Japanese font when I want it to?

#4 Post by kuroshirushi » Wed Dec 23, 2020 10:34 pm

Thank you I'll give it a try

Post Reply

Who is online

Users browsing this forum: No registered users