How on earth do you change the dialogue font and color??

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
thirstyoctopus
Regular
Posts: 72
Joined: Mon Aug 27, 2018 12:04 pm
Projects: Romance Visual Novel story
Organization: Thirsty Octopus
Contact:

How on earth do you change the dialogue font and color??

#1 Post by thirstyoctopus » Mon Aug 27, 2018 12:14 pm

Hello everyone

I'm pretty new to Ren'Py but really liking it so far as I'm constructing my first VN. However I'm having great difficulty doing things which I would think would be quite easy. Currently the font for the dialogue box is standard Verdana (I think) and I want to personalise it by changing the colour and face to match my game style.

Currently I tried this in the config.rpy file:

Code: Select all

init python:

    style.default.font = "KGPrimaryPenmanship2.ttf"
    style.default.size = 18
    style.default.color = "#19dddc"
And although no errors get thrown, the font does not change at all. I also tried:

Code: Select all

style default:
    font "KGPrimaryPenmanship2.ttf"
    size 18
    color "#19dddc"
as suggested by PyTom in another thread but it throws errors as invalid syntax.

Short of adding the font information in each character's define statement (which means the 'narration' text isn't affected) I don't really know how else to change this?

Any help on this would be greatly appreciated as I am still learning, thank you in advance.

Michael

User avatar
scarletthinks
Newbie
Posts: 6
Joined: Mon Aug 27, 2018 11:23 am
Contact:

Re: How on earth do you change the dialogue font and color??

#2 Post by scarletthinks » Mon Aug 27, 2018 12:22 pm

Hi!
First, put the font file (KGPrimaryPenmanship2.ttf, in this case) in your game folder (that's really important, since it won't work otherwise). Then, simply change this part in gui.rpy

Code: Select all

## Fonts and Font Sizes ########################################################

## The font used for in-game text.
define gui.text_font = "DejaVuSans.ttf"

## The font used for character names.
define gui.name_text_font = "DampfPlatzs.ttf"

## The font used for out-of-game text.
define gui.interface_text_font = "DejaVuSans.ttf"
however you like~
You can also change font size, color and everything regarding text in gui.rpy, too!

User avatar
thirstyoctopus
Regular
Posts: 72
Joined: Mon Aug 27, 2018 12:04 pm
Projects: Romance Visual Novel story
Organization: Thirsty Octopus
Contact:

Re: How on earth do you change the dialogue font and color??

#3 Post by thirstyoctopus » Mon Aug 27, 2018 12:38 pm

Ah - I think that was my issue, I was putting it in the wrong file! Thank you!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]