removing line spacing in the namebox?

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
Rainvillain
Regular
Posts: 74
Joined: Thu Mar 05, 2015 11:27 am
Contact:

removing line spacing in the namebox?

#1 Post by Rainvillain » Thu Mar 29, 2018 3:25 pm

Hi there,

I have my character's names on two separate lines in the namebox but I would like the space between names to be smaller.
I know {vspace=##} can be used to add spacing, but not sure how to remove it. I've tried vspace=-##, but that didn't do anything.
My code looks like this:

Code: Select all

define e = Character("{font=CormorantGaramond-Regular.ttf}{size=40}Aurore{/size}{/font}\n{space=70}{color=#f00}Amanite{/color}", what_xalign=0.5)
and that looks like this:
Screen Shot 2018-03-29 at 3.18.25 PM.png
but I want the spacing/gap between first and last name to be closer to mockup:
Screen Shot 2018-03-29 at 12.08.52 PM.png
I also tried adding this line to my gui.rpy file:

Code: Select all

define gui.namebox_spacing = 1000 #a big number just to see if it would do anything...
...but it did nothing.
Any suggestions?

EDIT: In the end, I decided to simply use a PNG of the text instead of trying to format it within renpy -- I did this by adding the "{image=image.png}" instead of a character name while defining the character and that seems to work well :)
Currently working on Cross the Moon
https://patrick-rainville.itch.io/cross-the-moon

User avatar
Qlara
Regular
Posts: 80
Joined: Fri Nov 28, 2014 10:22 am
Completed: Carmilla
Skype: kantonija
itch: visualgothic
Location: Berlin
Contact:

Re: removing line spacing in the namebox?

#2 Post by Qlara » Sun Apr 01, 2018 6:33 am

I managed to decrease the namebox-text line height by adding this to gui.rpy (you were so close, too).

Code: Select all

define gui.name_text_line_spacing = -30

Post Reply

Who is online

Users browsing this forum: _ticlock_