Hello,
I don't know if this is the right place for my problem, so I'm sorry if it isn't.
There is a problem with how Renpy handles "tashkil" for Arabic language.
The word that's underlined is where the problem is. Whenever I use "tashkil", Renpy will disconnect the letters and place the "tashkil" one-letter in advance.
This is how the word should be displayed:
Hope it is clear.
Thank you!
Arabic diacritics (Tashkil)
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.
- PyTom
- Ren'Py Creator
- Posts: 16096
- 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: Arabic diacritics (Tashkil)
(This is more appropriate for the Q&A section, so I'll move it.)
Are you setting config.rtl = True in your game? That's needed for proper arabic text shaping support. Please try:
Are you setting config.rtl = True in your game? That's needed for proper arabic text shaping support. Please try:
Code: Select all
config.rtl = True
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Arabic diacritics (Tashkil)
Yes, I do have it in my options file.PyTom wrote: ↑Mon May 14, 2018 6:46 pm (This is more appropriate for the Q&A section, so I'll move it.)
Are you setting config.rtl = True in your game? That's needed for proper arabic text shaping support. Please try:
Code: Select all
config.rtl = True
- PyTom
- Ren'Py Creator
- Posts: 16096
- 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: Arabic diacritics (Tashkil)
That's odd. Can you type that line of text in to the forum here, so I can copy and paste it into Ren'Py and see whgat happens? I don't know the first thing about how to input Arabic.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- PyTom
- Ren'Py Creator
- Posts: 16096
- 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: Arabic diacritics (Tashkil)
Okay, I spent a few hours looking into this, but unfortunately I don't have good news for. I'm going to explain my understanding of things - I'm sure you already know this, but I'm kind of hoping that I got something wrong that would make things easier on us. Forgive me if this sounds like I'm talking down here - this is sort of rubber duck debugging, me talking this out to myself in public in the hope someone will come up to me and say I got something wrong.
So, these are Arabic diacritics, which are used to indicate missing vowels and consonant length. These tend to be used in religious texts (which I'm guessing have obscure words) and works written for children (who need to be able to match word sounds with written words), but not as part of general writing meant to be consumed by adults.
The problem is that placing these diacritics is hard. There are fairly complicated rules that need to be obeyed, since it's reasonable that multiple diacritics can be applied to a single character, and the location of the diacritic will vary based on the character it's applied to and any other diacritics that are present.
I think this is beyond what I could add to Ren'Py in any sort of reasonable timeframe, at least with any sort of degree of correctness. It would basically require a rewrite of how Ren'Py handles text, to make it use a library like harfbuzz, and everything else that entails. I won't rule out doing that someday, but that someday is going to be a long time off.
The one thing I could do would be to give you a text tag that takes in a series of characters, and returns instructions to tell Ren'Py how to move the last character. So it might see U+fee2 (meem final form) and U+064e (fatah), and it would know to move U+064e left and down by so many pixels when that happens.
If that's interesting, let me know, and I could add that feature. And if I got something wrong here, please let me know. But apart from that, I don't think I can fix this on a reasonable timeframe.
So, these are Arabic diacritics, which are used to indicate missing vowels and consonant length. These tend to be used in religious texts (which I'm guessing have obscure words) and works written for children (who need to be able to match word sounds with written words), but not as part of general writing meant to be consumed by adults.
The problem is that placing these diacritics is hard. There are fairly complicated rules that need to be obeyed, since it's reasonable that multiple diacritics can be applied to a single character, and the location of the diacritic will vary based on the character it's applied to and any other diacritics that are present.
I think this is beyond what I could add to Ren'Py in any sort of reasonable timeframe, at least with any sort of degree of correctness. It would basically require a rewrite of how Ren'Py handles text, to make it use a library like harfbuzz, and everything else that entails. I won't rule out doing that someday, but that someday is going to be a long time off.
The one thing I could do would be to give you a text tag that takes in a series of characters, and returns instructions to tell Ren'Py how to move the last character. So it might see U+fee2 (meem final form) and U+064e (fatah), and it would know to move U+064e left and down by so many pixels when that happens.
If that's interesting, let me know, and I could add that feature. And if I got something wrong here, please let me know. But apart from that, I don't think I can fix this on a reasonable timeframe.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Arabic diacritics (Tashkil)
That's okay, Tom.PyTom wrote: ↑Thu May 24, 2018 12:14 am Okay, I spent a few hours looking into this, but unfortunately I don't have good news for. I'm going to explain my understanding of things - I'm sure you already know this, but I'm kind of hoping that I got something wrong that would make things easier on us. Forgive me if this sounds like I'm talking down here - this is sort of rubber duck debugging, me talking this out to myself in public in the hope someone will come up to me and say I got something wrong.
So, these are Arabic diacritics, which are used to indicate missing vowels and consonant length. These tend to be used in religious texts (which I'm guessing have obscure words) and works written for children (who need to be able to match word sounds with written words), but not as part of general writing meant to be consumed by adults.
The problem is that placing these diacritics is hard. There are fairly complicated rules that need to be obeyed, since it's reasonable that multiple diacritics can be applied to a single character, and the location of the diacritic will vary based on the character it's applied to and any other diacritics that are present.
I think this is beyond what I could add to Ren'Py in any sort of reasonable timeframe, at least with any sort of degree of correctness. It would basically require a rewrite of how Ren'Py handles text, to make it use a library like harfbuzz, and everything else that entails. I won't rule out doing that someday, but that someday is going to be a long time off.
The one thing I could do would be to give you a text tag that takes in a series of characters, and returns instructions to tell Ren'Py how to move the last character. So it might see U+fee2 (meem final form) and U+064e (fatah), and it would know to move U+064e left and down by so many pixels when that happens.
If that's interesting, let me know, and I could add that feature. And if I got something wrong here, please let me know. But apart from that, I don't think I can fix this on a reasonable timeframe.
Thank you for taking the time to look into this.
As for the diacritics, it's more to tell the reader how to pronounce the word. See every letter in Arabic has three sounds based on these diacritics. While native speakers won't have problem reading texts without these diacritics, sometimes they are a necessity because it's possible to have two words that are spelled the same but they have different meanings because of the diacritics, and that's why they are important.
I would be very interested in the text tag.
Hopefully one day, this feature would be added to Renpy.
Who is online
Users browsing this forum: Ahrefs [Bot], Ocelot