ui.text with font attributes

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
Alessio
Miko-Class Veteran
Posts: 576
Joined: Fri May 07, 2004 9:40 am
Completed: GO! Magical Boy (2006), Angelic Orbs (soundtrack)
Projects: Cyberlin (in progress)
Location: Finland
Contact:

ui.text with font attributes

#1 Post by Alessio »

Me with a question again! ^_^

I've noticed an odd thing: When using font attributes, the positioning of ui.text widgets doesn't work anymore. The following snippet centers some text:

Code: Select all

    $ mytext = "Hello World!"
    $ ui.text(mytext, xpos=0.5, xanchor='center', ypos=0.3, yanchor='top', textalign=0.5)
If you now use italics:

Code: Select all

    $ mytext = "{i}Hello World!{/i}"
then the beginning of the text is centered, not the widget itself. Should I avoid this altogether and use a different approach, or is this a bug?

Cheers,
Alessio

User avatar
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:

#2 Post by PyTom »

You couldn't have reported this yesterday? :-)

Yes, it's a bug. It's been fixed in my current codebase.
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

Alessio
Miko-Class Veteran
Posts: 576
Joined: Fri May 07, 2004 9:40 am
Completed: GO! Magical Boy (2006), Angelic Orbs (soundtrack)
Projects: Cyberlin (in progress)
Location: Finland
Contact:

#3 Post by Alessio »

Yesterday? Oh, darn it, the dial on my time machine is broken. Wanted to come back on Sunday. Spent five years in 2145-2150 trying to get my game script finished. ^_-

No worries, at least now I know I'm still sane and don't have to pull my hair out. I'm sure we'll have another update before IntRenAiMo...

User avatar
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:

#4 Post by PyTom »

Rufus wrote:To get back the day before, you want to *donk* dial *donk* one *donk* number *donk* before!
(And now to see if anyone will spot this reference.)

_____________
"Be excellent to each other."

ozurr
Regular
Posts: 42
Joined: Sat Jun 21, 2003 12:07 am
Contact:

#5 Post by ozurr »

Hi,and welcome to the future. San Dimas, California 2688. And I'm telling you everything is great. The air is clean. The water is clean. Even the dirt... is clean. Bowling averages are way up. Mini Golf scores are way down. And we have more waterslides than any other planet we communicate with. I'm telling you it's great. But it almost wasn't. You see, 700 years ago the two great ones ran into a few problems. So now I must travel back in time to help them out. If I should fail to keep these two on the correct path, basis of our society will be in danger. Don't worry. It'll make sense. I'm a professional.

musical74
Eileen-Class Veteran
Posts: 1021
Joined: Sat Dec 18, 2004 6:13 pm
Location: Oregon
Contact:

#6 Post by musical74 »

*looks at the map...BOY am I lost!*

But then, I don't get the reference so that's OK...
A friend is one that walks in when the world walks out.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Baidu [Spider], Bing [Bot], Google [Bot], Semrush [Bot]