[Solved] Disproportionate text scaling.

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
K-PSZH
Regular
Posts: 37
Joined: Sun May 15, 2022 10:34 am
Soundcloud: K-PSZH
Location: Russia
Contact:

[Solved] Disproportionate text scaling.

#1 Post by K-PSZH »

Can I change the text size only horizontally or vertically (for example, make it wide or high)?
Last edited by K-PSZH on Fri Jun 10, 2022 1:50 pm, edited 1 time in total.
Missing/forgetting a lot of simplest things and ask about them here.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2407
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Disproportionate text scaling.

#2 Post by Ocelot »

Do you want scaled text as part of larger sentence or do you want to display it separately?
< < insert Rick Cook quote here > >

User avatar
K-PSZH
Regular
Posts: 37
Joined: Sun May 15, 2022 10:34 am
Soundcloud: K-PSZH
Location: Russia
Contact:

Re: Disproportionate text scaling.

#3 Post by K-PSZH »

I want it to be a character name (say_label).
Missing/forgetting a lot of simplest things and ask about them here.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2407
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Disproportionate text scaling.

#4 Post by Ocelot »

if you want all character names to be scaled, apply xzoom / yzoom property to it in say screen.
If you need only a specific character name to be scaled, you can create a Text displayable with properties set and then insert it as image into your character name:

Code: Select all

image sample_name = Text("sample", xzoom=1.8)

define sample_character = Character("{image=sample_name}")
< < insert Rick Cook quote here > >

User avatar
K-PSZH
Regular
Posts: 37
Joined: Sun May 15, 2022 10:34 am
Soundcloud: K-PSZH
Location: Russia
Contact:

Re: Disproportionate text scaling.

#5 Post by K-PSZH »

Ocelot wrote: Fri Jun 10, 2022 12:04 pm If you need only a specific character name to be scaled, you can create a Text displayable with properties set and then insert it as image into your character name:

Code: Select all

image sample_name = Text("sample", xzoom=1.8)

define sample_character = Character("{image=sample_name}")
Hmm, this thing didn't worked for me.
Ocelot wrote: Fri Jun 10, 2022 12:04 pm if you want all character names to be scaled, apply xzoom / yzoom property to it in say screen.
Can you please say where exactly should I apply it?

Code: Select all

screen say(who, what):
    style_prefix "say"

    window:
        id "window"

        if who is not None:

            window:
                id "namebox"
                style "namebox"
                text who id "who"

        text what id "what"
Missing/forgetting a lot of simplest things and ask about them here.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2407
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Disproportionate text scaling.

#6 Post by Ocelot »

text who id "who" xzoom 5
< < insert Rick Cook quote here > >

User avatar
K-PSZH
Regular
Posts: 37
Joined: Sun May 15, 2022 10:34 am
Soundcloud: K-PSZH
Location: Russia
Contact:

Re: Disproportionate text scaling.

#7 Post by K-PSZH »

Ocelot wrote: Fri Jun 10, 2022 1:22 pm text who id "who" xzoom 5

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/screens.rpy", line 117: u'xzoom' is not a keyword argument or valid child for the text statement.
    text who id "who" xzoom 5
                           ^

Missing/forgetting a lot of simplest things and ask about them here.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2407
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Disproportionate text scaling.

#8 Post by Ocelot »

Oh, sorry, text statement does not take ATL properties, you need to write:

Code: Select all

text who id "who":
    at transform:
        xzoom 5.
< < insert Rick Cook quote here > >

User avatar
K-PSZH
Regular
Posts: 37
Joined: Sun May 15, 2022 10:34 am
Soundcloud: K-PSZH
Location: Russia
Contact:

Re: Disproportionate text scaling.

#9 Post by K-PSZH »

Ocelot wrote: Fri Jun 10, 2022 1:45 pm Oh, sorry, text statement does not take ATL properties, you need to write:

Code: Select all

text who id "who":
    at transform:
        xzoom 5.
Now it works perfectly. Thanks.
Missing/forgetting a lot of simplest things and ask about them here.

Post Reply

Who is online

Users browsing this forum: Google [Bot]