[help]About display Chinese

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.
Message
Author
sigmaxion
Regular
Posts: 35
Joined: Wed Jul 19, 2006 6:52 pm
Location: China
Contact:

[help]About display Chinese

#1 Post by sigmaxion »

I love this engine, but it seems that it didn't support Chinese language...
Is there any solution?

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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:

#2 Post by PyTom »

It does support Chinese. You need to:

- save as utf-8
- copy east_asian.rpy from the extras/ directory to the game/ directory
- set style.default.font to a Chinese font.

and eventually you'll want to translate the menus... but Chinese should be supported.

The one exception is that renpy.input() will not work with non-western languages, as there's no support for input methods in the libraries Ren'Py uses.

If you need help getting it working, please let me know.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Guest

#3 Post by Guest »

thank you.
but excuse me for bothering again...
Where could I find the "style.default.font". In the "game\script.rpy" or somewhere else...

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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:

#4 Post by PyTom »

You need to add it yourself. Somewhere in your script, you want to add the lines:

Code: Select all

init:
    $ style.display.font = "chinese.ttf"
Where chinese.ttf is the name of a truetype font that supports Chinese characters. You'll also want to put that font into the game directory, so Ren'Py picks it up.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

sigmaxion
Regular
Posts: 35
Joined: Wed Jul 19, 2006 6:52 pm
Location: China
Contact:

#5 Post by sigmaxion »

thank you!
It surely works!
Well, maybe I should introduce this excellent stuff to chinese doujin game maker right now...:)

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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:

#6 Post by PyTom »

I'm glad you were able to get it working. If there's anything to do to improve the Chinese support, please let me know. Right now, east_asian.rpy changes the line-breaking rules so they allow lines to wrap between any two Hanzi... is that the right rule.

Also, if you or anyone makes a game with Ren'Py, please let me know, so I can post in on the main Ren'Py page.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

evelynbaby

I can't find extra/east_asian.rpy

#7 Post by evelynbaby »

:(

I am sorry, but I don't know where east_asian.rpy or chinese.rpy is.

Could someone tell me where to find this file?

Thank you.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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:

#8 Post by PyTom »

You can find the appropriate code at:

http://www.renpy.org/wiki/renpy/doc/coo ... d_Japanese
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

sigmaxion
Regular
Posts: 35
Joined: Wed Jul 19, 2006 6:52 pm
Location: China
Contact:

#9 Post by sigmaxion »

I'm in love, so I have no time for game making:)

Kakurady
Newbie
Posts: 20
Joined: Tue Apr 03, 2007 6:21 am
Location: Shanghai, China
Contact:

#10 Post by Kakurady »

Any free (in beer or speech) Chinese fonts?

That article told us to fetch the font from the Windows font dir.
(Obviously unlikely 2.B. legal.)

I use Ubuntu Linux and they have free zh-cn fonts... in postscript.

(Looks this may help)
(Hint ttf-arphic-ukai & ttf-arphic-uming are fonts w/ zh-cn & zh-tw glyphs)

Also... sigmaxion, are you the one who's creating the wiki pages? You may want to consider registering so others may track your edits..
No, I don't like Ren'ai games.
But Ren'Py is not only another Ren'ai game Engine.

bardsmanship
Regular
Posts: 41
Joined: Sat Jun 04, 2005 7:47 pm
Location: Singapore
Contact:

#11 Post by bardsmanship »

This is probably off-topic, but I just wanted to say, I'm really glad Chinese VN makers are getting to know about Ren'py! I'm bilingual in English and Chinese, so the prospect of playing Chinese VNs is mouth-watering ;)

Oh, and if anyone wants to translate their Chinese game to English, I'll be willing to do it for you!

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#12 Post by DaFool »

I'd like you guys also to keep tabs on the scene and announce any Chinese Ren'Py games released, so we can list it. It just seems unnatural that all the games so far have been English (or Czech translations). I'm also wondering how many Chinese gamemakers use Japanese engines such as Kirikiri.

Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

#13 Post by Enerccio »

Kakurady wrote:Any free (in beer or speech) Chinese fonts?

That article told us to fetch the font from the Windows font dir.
(Obviously unlikely 2.B. legal.)

I use Ubuntu Linux and they have free zh-cn fonts... in postscript.

(Looks this may help)
(Hint ttf-arphic-ukai & ttf-arphic-uming are fonts w/ zh-cn & zh-tw glyphs)

Also... sigmaxion, are you the one who's creating the wiki pages? You may want to consider registering so others may track your edits..
I am not sure if it is free but this font contains both Chinese and Japanese
http://www.sendspace.com/file/3nuju3 (10mb simhei.ttf)

I am using it myself... just in case Japanese would be needed ^^
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

sigmaxion
Regular
Posts: 35
Joined: Wed Jul 19, 2006 6:52 pm
Location: China
Contact:

#14 Post by sigmaxion »

To Kakurady:

To be honest, that article is a little bit out of date. Nowadays, I recommend people to use the system fonts in the Windows OS. By doing this, you don't need to ship the font with your game, and I think it also can avoid the copyright issue. (Geez, I have no idea about Linux and Mac, because I've never used both of them...)

To bardsmanship

Thank you for your kindness. And, well, it's a shame that I haven't finished a complete Chinese game with Ren'Py. And I don't think there's someone doing better than me...
Anyway, if appropriate, I or others will not hesitate to ask for your help. ;)

To DaFool

I'm afraid that there are much more people using Kirikiri than Ren'Py in China...
Because a lot of people have difficulty in reading English, but they can geuss the meaning of a japanese sentence by a few of Kanji...
I'm in love, so I have no time for game making:)

Kakurady
Newbie
Posts: 20
Joined: Tue Apr 03, 2007 6:21 am
Location: Shanghai, China
Contact:

#15 Post by Kakurady »

Enerccio wrote: I am not sure if it is free but this font contains both Chinese and Japanese
http://www.sendspace.com/file/3nuju3 (10mb simhei.ttf)

I am using it myself... just in case Japanese would be needed ^^
Simhei is definitely non-free. Since when you see Windows bundles something free?

And it's a Chinese font, so it may be unsuitable for Japanese.
For example some kanji (e.g. 猫 / mao1 / neko - this same glyph will display differently with Chinese fonts and Japanese fonts) may not display as intended. And Kana will look weird under low resolutions.
No, I don't like Ren'ai games.
But Ren'Py is not only another Ren'ai game Engine.

Post Reply

Who is online

Users browsing this forum: barsunduk, Semrush [Bot]