Page 1 of 1

How to change the font only in the name box?

Posted: Thu Sep 09, 2021 5:00 pm
by Bnig98JR
I'm looking to make the font in the name box different than the regular dialogue, how would I go about this?

Re: How to change the font only in the name box?

Posted: Thu Sep 09, 2021 6:05 pm
by qirien
You're going to look in screens.rpy. The screen that controls how the text box looks is the "say" screen, so scroll down until you find that.

You can see that it says "style "namebox"" which means it will use a style called namebox to decide how to show the name. Scrolling down a bit you can see it says "style namebox is default". That means it will use the regular style from the interface, but we can change that here. You can have something like:

Code: Select all

style namebox is default:
     text_color "#ff0000"  # red text color
     text_size 60             # really huge size
     text_font "fonts/WeirdFont.otf"  # make sure this font exists!
     
Then it will display the name however you say it should.

There's lots more about this in the GUI Customization guide:
https://www.renpy.org/doc/html/gui.html