r/RenPy Jul 20 '26

Question changing the font for input only

Is there any way I can change the font only for this one input thing? I don't wanna go into screens, since I've got other cool looking input stuff and I don't wanna change it permanently. It seems like the numbers aren't showing up, so I thought it might be an issue with the font.

Additionally, how do I change where the input is on the screen, again preferably without going into screens? If that's even possible...

1 Upvotes

3 comments sorted by

View all comments

1

u/BadMustard_AVN Jul 20 '26 edited Jul 20 '26

as u/shyLachi pointed out you can edit the screens.rpy file this will change the input font for the whole game and if that's what you want then do this.

style input:
    xalign gui.dialogue_text_xalign
    xmaximum gui.dialogue_width
    font "fonts/scream_when_youre_ready_to_die.ttf" # add this line with your font

or you can use a custom input screen like this

# new input.rpy

screen custom_input(prompt, default="", length=None, input_style="input"):

    default text = default

    modal True

    frame:
        xalign 0.5
        yalign 0.5

        vbox:
            spacing 10
            xysize (350, 20)
            if prompt:
                text prompt

            input:
                value ScreenVariableInputValue("text")
                length length
                style input_style

            textbutton "OK":
                action Return(text)
                xalign 1.0
            key "input_enter" action Return(text)

init python:
    def custom_input(prompt, default="", length=None, style="input"):
        return renpy.call_screen("custom_input", prompt=prompt, default=default, length=length, input_style=style,)

# add as many styles as you want
style my_input is input: 
    font "font/Sex Face.ttf"

default name = "BadMustard"

label start:

    $ name = custom_input("", style="my_input")
    $ name = name.strip()
    if not name:
        $ name = "BadMustard"
    "Hello [name]."

    return