cant seem to change the character name font in game

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.
Message
Author
User avatar
Jadenday
Newbie
Posts: 24
Joined: Fri Apr 25, 2014 1:18 pm
Projects: Yandere wa do yu imi deka?!
Contact:

cant seem to change the character name font in game

#1 Post by Jadenday » Mon May 12, 2014 7:43 pm

i need help with changing the font of the character names in my VN. I tried to follow the instructions from the renpy wiki but that didn't really work for me. Help?

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: cant seem to change the character name font in game

#2 Post by Asceai » Mon May 12, 2014 7:48 pm

define e = Character('Eileen', who_font="font.ttf")

make sure font.ttf (or whatever it is called) is in the game directory

User avatar
Jadenday
Newbie
Posts: 24
Joined: Fri Apr 25, 2014 1:18 pm
Projects: Yandere wa do yu imi deka?!
Contact:

Re: cant seem to change the character name font in game

#3 Post by Jadenday » Mon May 12, 2014 7:50 pm

Asceai wrote:define e = Character('Eileen', who_font="font.ttf")

make sure font.ttf (or whatever it is called) is in the game directory
alright and where do i define the character? in the script.rpy? and do i have to do that for every individual character?

User avatar
Jadenday
Newbie
Posts: 24
Joined: Fri Apr 25, 2014 1:18 pm
Projects: Yandere wa do yu imi deka?!
Contact:

Re: cant seem to change the character name font in game

#4 Post by Jadenday » Mon May 12, 2014 7:56 pm

Asceai wrote:define e = Character('Eileen', who_font="font.ttf")

make sure font.ttf (or whatever it is called) is in the game directory
alright and where do i define the character? in the script.rpy? and do i have to do that for every individual character?

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: cant seem to change the character name font in game

#5 Post by Asceai » Mon May 12, 2014 7:56 pm

Oh, I thought you wanted to change the font for a particular character's name. If you want to change it for all characters:

Code: Select all

style say_label font "font.ttf"
(You need renpy 6.17 or newer for new-style say statements to work)

That can go in any .rpy file, same as the character definition. See the Quickstart guide for information about defining characters.

User avatar
Jadenday
Newbie
Posts: 24
Joined: Fri Apr 25, 2014 1:18 pm
Projects: Yandere wa do yu imi deka?!
Contact:

Re: cant seem to change the character name font in game

#6 Post by Jadenday » Mon May 12, 2014 8:01 pm

Asceai wrote:Oh, I thought you wanted to change the font for a particular character's name. If you want to change it for all characters:

Code: Select all

style say_label font "font.ttf"
(You need renpy 6.17 or newer for new-style say statements to work)

That can go in any .rpy file, same as the character definition. See the Quickstart guide for information about defining characters.
awesome. and how do i change the size of the character names?

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: cant seem to change the character name font in game

#7 Post by Asceai » Mon May 12, 2014 8:02 pm

style say_label size 30

User avatar
Jadenday
Newbie
Posts: 24
Joined: Fri Apr 25, 2014 1:18 pm
Projects: Yandere wa do yu imi deka?!
Contact:

Re: cant seem to change the character name font in game

#8 Post by Jadenday » Mon May 12, 2014 8:06 pm

Asceai wrote:style say_label size 30
alright. i put those codes at the end of the options.rpy and im getting a red arrow in the code. also, i have the latest renpy so it should work right?

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: cant seem to change the character name font in game

#9 Post by Asceai » Mon May 12, 2014 8:26 pm

I dunno, did you test it? I don't know what you mean by a red arrow. Is this something in your text editor?

User avatar
Jadenday
Newbie
Posts: 24
Joined: Fri Apr 25, 2014 1:18 pm
Projects: Yandere wa do yu imi deka?!
Contact:

Re: cant seem to change the character name font in game

#10 Post by Jadenday » Mon May 12, 2014 10:20 pm

Asceai wrote:I dunno, did you test it? I don't know what you mean by a red arrow. Is this something in your text editor?
nevermind lol found another way. but THANK YOU SO MUCH for helping! :D

Clueless
Newbie
Posts: 6
Joined: Tue May 13, 2014 8:19 pm
Contact:

Re: cant seem to change the character name font in game

#11 Post by Clueless » Tue May 13, 2014 8:59 pm

I'm having the same problem - I cant seem to get my character names in the font I want. I want all the characters names to have the same font.

I dont know if its a problem with the code or with the file type. I notice that everyone seems to use .ttf when talking about putting fonts in renpy but I only have a .otf file type. Will it work? If not does anyone know a place where I can convert? (I'm not sure if thats even possible)

If an .otf file should work then a bit of help with the code would be great.

This is what Ive got at the bottom of the options screen.

style.say_label.font = "Octant.otf", style.say_label.size = 24

The game wont run and I get a message that says "cant assign to literal". I have no experience with code or any of the terminology so I dont know what it means. If anyone could help that would be good. And it would help it you spelled it out becuase I'm at absolute beginner level. Thanks!

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1778
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: cant seem to change the character name font in game

#12 Post by OokamiKasumi » Tue May 13, 2014 9:32 pm

Clueless wrote:...I dont know if its a problem with the code or with the file type. I notice that everyone seems to use .ttf when talking about putting fonts in renpy but I only have a .otf file type. Will it work?
As far as I know, you need to use a TTF front. An OTF will not work.
Clueless wrote:This is what Ive got at the bottom of the options screen.
style.say_label.font = "Octant.otf", style.say_label.size = 24
This needs to be coded this way:

Code: Select all

    style.say_label.font = "YourFont.ttf" 
    style.say_label.size = 24
No Commas.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

Clueless
Newbie
Posts: 6
Joined: Tue May 13, 2014 8:19 pm
Contact:

Re: cant seem to change the character name font in game

#13 Post by Clueless » Wed May 14, 2014 10:11 am

Thank you very much! I'll see if I can get the font as ttf and give it a go after work :D

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: cant seem to change the character name font in game

#14 Post by Asceai » Wed May 14, 2014 3:40 pm

Easiest thing to do is to use a web font generator like this one, which will convert your font into a variety of file formats, one of which will be a TTF.

User avatar
korova
Veteran
Posts: 217
Joined: Sat Jun 27, 2009 5:15 pm
Completed: Ivy, Chocolate, Time, Clair Obscur
Projects: Writing exercises, The House [Nano18]
Tumblr: korova08
itch: korova
Location: Normandie, France
Contact:

Re: cant seem to change the character name font in game

#15 Post by korova » Wed May 14, 2014 5:06 pm

OokamiKasumi wrote: As far as I know, you need to use a TTF front. An OTF will not work.
I'm surprised. I thought so too, but I used an .otf font by mistake, and it works like a charm...

Post Reply

Who is online

Users browsing this forum: Google [Bot]