visual novel in foreign language, the dialogue texts breaks! font problem ? or is it renpy?

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
mahin101
Newbie
Posts: 7
Joined: Sat Jun 13, 2020 4:48 am
Contact:

visual novel in foreign language, the dialogue texts breaks! font problem ? or is it renpy?

#1 Post by mahin101 »

Hello good people! I am trying write a visual novel in Bengali/Bangla. I can write the codes in notepad without any problem. but when i run the code in renpy the text 'breaks'. I tried to change the font by editing the following lines in gui.rpy:

Code: Select all

## The font used for in-game text.
define gui.text_font = "vrinda.ttf"

## The font used for character names.
define gui.name_text_font = "vrinda.ttf"

## The font used for out-of-game text.
define gui.interface_text_font = "vrinda.ttf"
the fonts were previously dejavusans.ttf which don't support bengali text.

renpy does show bengali text but not entirely accurately.

what other things i can try?
Attachments
asdf.PNG

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

Re: visual novel in foreign language, the dialogue texts breaks! font problem ? or is it renpy?

#2 Post by Imperf3kt »

When creating your project, which language did you use?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

mahin101
Newbie
Posts: 7
Joined: Sat Jun 13, 2020 4:48 am
Contact:

Re: visual novel in foreign language, the dialogue texts breaks! font problem ? or is it renpy?

#3 Post by mahin101 »

Imperf3kt wrote: Sat Jun 13, 2020 5:58 pm When creating your project, which language did you use?
I created the project in English.
When i click on 'new project' renpy says: you will be creating an English language project. Change the launcher language in preference to create a project in another language.

But in preference, I can select a variety of languages but not Bengali :(

I don't need the entire game(the options and whatnot) in Bengali. I just need the dialogues in Bengali.

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: visual novel in foreign language, the dialogue texts breaks! font problem ? or is it renpy?

#4 Post by hell_oh_world »

would this help? not sure if about Bengali if its western or not. sorry. try to play with the values are available in this link.
https://www.renpy.org/doc/html/style_pr ... y-language
"western"
Allows breaking only at whitespace. Suitable for most languages.

Code: Select all

define e = Character("Eileen", what_language="western")
define narrator = Character(None, what_language="western")
label start:
  # your dialogues such as...
  e "the dialogue"
  "the dialogue"

mahin101
Newbie
Posts: 7
Joined: Sat Jun 13, 2020 4:48 am
Contact:

Re: visual novel in foreign language, the dialogue texts breaks! font problem ? or is it renpy?

#5 Post by mahin101 »

hell_oh_world wrote: Sun Jun 14, 2020 3:33 am would this help? not sure if about Bengali if its western or not. sorry. try to play with the values are available in this link.
https://www.renpy.org/doc/html/style_pr ... y-language
"western"
Allows breaking only at whitespace. Suitable for most languages.

Code: Select all

define e = Character("Eileen", what_language="western")
define narrator = Character(None, what_language="western")
label start:
  # your dialogues such as...
  e "the dialogue"
  "the dialogue"
Sadly nothing happens. There is no change when I try different values of `what_language`. The English texts(dialogues) also don't change.
Is the English text supposed to change for different values of `what_language` ?

What are the ways of writing foreign texts other than changing the fonts in gui.rpy

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

Re: visual novel in foreign language, the dialogue texts breaks! font problem ? or is it renpy?

#6 Post by PyTom »

Ren'Py doesn't support Bengali text shaping (or text shaping for the other indic scripts). Ren'Py has it's own text layout engine, and those scripts are basically the one major family that it doesn't support yet. That's because the rules for layout are very complicated, and unlike Arabic, there aren't precomposed version of the indic scripts that I can work with.

Right now I don't have plans to work on this. I don't think I could do an acceptable job of it, as I don't understand the orthography or the relevant aspects of this. I'd be very interested if someone wanted to contribute this to Ren'Py, though I'd ask that they contact me, as I think the changes that would need to be made would be very intrusive.

(And if I'm wrong about this, let me know. I know nothing about the indic scripts other than that the have the reputation of being hard to add support for.)
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

mahin101
Newbie
Posts: 7
Joined: Sat Jun 13, 2020 4:48 am
Contact:

Re: visual novel in foreign language, the dialogue texts breaks! font problem ? or is it renpy?

#7 Post by mahin101 »

Thanks everyone for their help and information.

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

Re: visual novel in foreign language, the dialogue texts breaks! font problem ? or is it renpy?

#8 Post by Imperf3kt »

If text is not an option, you can always just use images of your text instead.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: No registered users