Font does not change. [Solved]

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
MaskedGuy
Newbie
Posts: 8
Joined: Mon Mar 13, 2017 10:05 pm
Projects: Masked Tales
Contact:

Font does not change. [Solved]

#1 Post by MaskedGuy »

Hello! I'm pretty new with Ren'Py and in the forum. Great software, no complaints. But I seem to have a bit of an odd problem. I want to change the font for all of the game's text. I found the following piece of code and I used it in options.rpy:

Code: Select all

## These let you customize the default font used for text in Ren'Py.

        ## The file containing the default font.

        style.default.font = "SHPinscher.otf"

        ## The default size of text.

        style.default.size = 30

        ## Note that these only change the size of some of the text. Other
        ## buttons have their own styles.
I uncommented it, saved the font file in the game directory, and what little I have made of my game runs smoothly, but the font does not change from the default one. I tried also to define a different font for a single character, and it just doesn't show. I may be missing something really obvious here, but I have not been able to fix this issue. I read the whole documentation and some other questions here, and I was unable to solve this myself, and as Ren'Py has not noticed anything wrong with the coding, I am perplexed. Can anyone tell me where did I screw things up? Thanks in advance.
Last edited by MaskedGuy on Wed Mar 15, 2017 12:34 pm, edited 1 time in total.

zabuzaeldemonio
Regular
Posts: 103
Joined: Sun Jan 08, 2017 7:24 pm
Projects: Call Me
Location: Spain
Contact:

Re: Font does not change.

#2 Post by zabuzaeldemonio »

Have you tried moving the SHPinscher.otf file to a folder? For example in the game /mynewdirectory, and then modify the options file in this way style.default.font = "mynewdirectory/SHPinscher.otf"
My personal Project:
Image

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Font does not change.

#3 Post by Donmai »

Before moving your font elsewhere close your game, if it is running, go to the launcher screen and click on the 'delete persistent' button. Run your game again.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

MaskedGuy
Newbie
Posts: 8
Joined: Mon Mar 13, 2017 10:05 pm
Projects: Masked Tales
Contact:

Re: Font does not change.

#4 Post by MaskedGuy »

Wow. That was fast! I must say I have already tried to delete persistent data to no success. And I just tried to move the font to a new folder, but it still does not change. Thanks, though; those two tricks will certainly help me later.

I'll tinker with the thing a bit more. If I solve it, I'll let you guys know.

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Font does not change.

#5 Post by gas »

MAYBE you're using the new gui theme.
And MAYBE you pasted that code in config.rpy, without changing the gui.rpy.

If that the case, remove those lines, and change instead these ones you find in gui.rpy:

Code: Select all

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

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

## The font used for character names.
define gui.name_font = "DejaVuSans.ttf"

## The font used for out-of-game text.
define gui.interface_font = "DejaVuSans.ttf"

## The size of normal dialogue text.
define gui.text_size = 30

## The size of character names.
define gui.name_text_size = 30

## The size of text in the game's user interface.
define gui.interface_text_size = 24

## The size of labels in the game's user interface.
define gui.label_text_size = 28

## The size of text on the notify screen.
define gui.notify_text_size = 16

## The size of the game's title.
define gui.title_text_size = 50
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

MaskedGuy
Newbie
Posts: 8
Joined: Mon Mar 13, 2017 10:05 pm
Projects: Masked Tales
Contact:

Re: Font does not change.

#6 Post by MaskedGuy »

That did the trick. Thank you, guys!

Post Reply

Who is online

Users browsing this forum: Andredron