Font
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.
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.
Font
This might seem like a really stupid question, but how can I change the font? For some reason it doesn't work when I use style.default.font in the options file and I get the following:
Parsing the script failed.
File "game/options.rpy", line 148: expected 'word' not found.
style->.default.font = "DejaVuSans.ttf"
Parsing the script failed.
File "game/options.rpy", line 148: expected 'word' not found.
style->.default.font = "DejaVuSans.ttf"
Re: Font
There is an field in config that does that.
Otherwise:
Might do the trick as well.
Otherwise:
Code: Select all
style text:
is default
font "DejaVuSans.ttf"- SinSisters
- Regular
- Posts: 94
- Joined: Sat Sep 20, 2014 11:07 am
- Projects: The Spanish Privateer
- Tumblr: thespanishprivateer
- itch: sinsisters
- Location: Ottawa, Canada
- Contact:
Re: Font
If you want to use the default font then you can just make it a comment, because I'm pretty sure that otherwise Ren'py will search for the font in the files. So you can have it as:
If you want to change it then remove the # and put the font name in between the quotation marks. Make sure you actually have the font in the game files.
-Nat
Code: Select all
## The file containing the default font.
# style.default.font = "DejaVuSans.ttf"
## The default size of text.
-Nat
Re: Font
xela wrote:There is an field in config that does that.
Otherwise:
Might do the trick as well.Code: Select all
style text: is default font "DejaVuSans.ttf"
Tried it, doesn't work.
SinSisters wrote:If you want to use the default font then you can just make it a comment, because I'm pretty sure that otherwise Ren'py will search for the font in the files. So you can have it as:If you want to change it then remove the # and put the font name in between the quotation marks. Make sure you actually have the font in the game files.Code: Select all
## The file containing the default font. # style.default.font = "DejaVuSans.ttf" ## The default size of text.
-Nat
"DejaVuSans.ttf" was an example, and it's precisely the fact that this code doesn't work that made me come here. I uncommented it and all, but all I got was the error that's in the first post.
Re: Font
Well, that worked for me and a lot (all?) other people who're using Ren'Py 
Post your code, try it on a fresh project... it's prolly some small thing you've missed.
Post your code, try it on a fresh project... it's prolly some small thing you've missed.
Re: Font
The code is literally just what you and the other person said. Using the code you gave me didn't show any errors, but it didn't show the font either.
Re: Font
What font are you using instead? Maybe it looks really similar... I cannot try it right now, but it would surprize me if config and style failed. Can you try specifying text as the style to whatever you're using to test new font?
Re: Font
Just to clarify, dejavusans is the default font of renpy. Everyone who gave you advice naturally assumed that you were trying to default to something else.
Re: Font
While the difference between them isn't as big as day and night, there is a clearly visible difference.
It works when I set it so only certain characters use the font by using the following code:
I know it's the default Ren'Py font, I was just using it instead of the actual font name.
It works when I set it so only certain characters use the font by using the following code:
Code: Select all
define e = Character('Eileen', color="#c8ffc8", what_font="DejaVuSans.ttf")
Last edited by Loading on Mon Jan 05, 2015 8:10 pm, edited 1 time in total.
Re: Font
My last suggestion would be to rename it to something else like myfont.ttf. Otherwise I need renpy to test it for myself and that doesn't fly on android. This should be basic stuff anyway.
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Font
Did you put the font into the game folder?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
Re: Font
Well, it already has a very unique name, so I don't see how it would help.xela wrote:My last suggestion would be to rename it to something else like myfont.ttf. Otherwise I need renpy to test it for myself and that doesn't fly on android. This should be basic stuff anyway.
Yes.trooper6 wrote:Did you put the font into the game folder?
Re: Font
Sweet.. should that not be flagged as a plain bug and fixed??? Sounds kinda ridiculous even if someone documents such a behavior.nyaatrap wrote:You can't change default font style if you are using a certain theme (A white tulip).
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Font
Okay, I just looked at the code for my game...my options.rpy file specifically.
My game uses a remade theme: Marker
Where is lets you customize the font, I have:
That is exactly how it is entered. I have no problems.
Could you post the code you have under that options section exactly, and use the code tags? Perhaps there is an indentation problem?
My game uses a remade theme: Marker
Where is lets you customize the font, I have:
Code: Select all
style.default.font = "00 fonts/Connie-Regular.ttf"Could you post the code you have under that options section exactly, and use the code tags? Perhaps there is an indentation problem?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
Who is online
Users browsing this forum: No registered users


