Problem with non-English text getting partially clipped out

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
User avatar
laspis
Newbie
Posts: 24
Joined: Sun Mar 01, 2015 12:18 am
Projects: Into the Depth of the Sky
itch: karita0101
Contact:

Problem with non-English text getting partially clipped out

#1 Post by laspis »

I am creating a game in Thai. The language has vowels that go both above and below the letters, and I am having trouble with those that go below getting clipped out. I have examples on what the text in-game looks like along with what it's supposed to look like.
screenshot0002.png
screenshot0002.png (215.94 KiB) Viewed 254 times
screenshot0001.png
screenshot0001.png (140.06 KiB) Viewed 254 times
The bottom of the character gets clipped out a little.
I have tried adjusting line spacing in screens.rpy. (line spacing = 1 or 2) The top line displays correctly half the time, but if I have more than 1 line, the bottom line will get clipped again, and now I have this wide gulf between the two lines. Searching in Thai forums is not yielding any results, sadly. And changing font is going to be a problem since other fonts I've tried have a slew of other more serious issues.
I am very new to coding so it'll be appreciated if you could give specific details on how to fix it. Thank you in advance.
EDIT: for reference this is the font I used
LayijiMahaniyom-Bao-1.2.zip
(61.64 KiB) Downloaded 6 times
Follow me on twitter to see my game progresses: @karita_solo
Currently working on Thai otome VN "Into the Depth of the Sky"

User avatar
m_from_space
Eileen-Class Veteran
Posts: 1040
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: Problem with non-English text getting partially clipped out

#2 Post by m_from_space »

laspis wrote: Wed May 15, 2024 1:29 am I am creating a game in Thai. The language has vowels that go both above and below the letters, and I am having trouble with those that go below getting clipped out. I have examples on what the text in-game looks like along with what it's supposed to look like.
Hey there. So first of all, I don't speak any Thai sadly. But I have tested your font in a new Renpy project by using a sample text for both the namebox and the dialogue box and nothing gets clipped away as far as I can tell. I didn't even use any kind of spacing or other style definitions. Here is the picture of my test:

thairenpy.png
thairenpy.png (13.4 KiB) Viewed 221 times

What Renpy version are you using? You may want to update it maybe.

Here is the code for my test, just pointing at your font that I renamed "Lay.ttf":

Code: Select all

define e = Character("Eileen (ฉันเป็นผู้หญิงที่ดี)", what_font="fonts/Lay.ttf", who_font="fonts/Lay.ttf")

# The game starts here.
label start:

    e "สุนัขของคุณอยู่ที่ไหน"

    return

User avatar
laspis
Newbie
Posts: 24
Joined: Sun Mar 01, 2015 12:18 am
Projects: Into the Depth of the Sky
itch: karita0101
Contact:

Re: Problem with non-English text getting partially clipped out

#3 Post by laspis »

Thank you so much for your reply! I updated to RenPy 8.2.1 and it's not longer clipped, no need for spacing/style adjustments as well.
Follow me on twitter to see my game progresses: @karita_solo
Currently working on Thai otome VN "Into the Depth of the Sky"

Post Reply

Who is online

Users browsing this forum: Google [Bot]