Fonts

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
DragonKnight
Regular
Posts: 51
Joined: Sun Nov 12, 2017 10:16 am
Projects: Taboo Hearts
Contact:

Fonts

#1 Post by DragonKnight » Tue Apr 03, 2018 11:00 am

How to you include new fonts into a game. I need one for a particular thing and then I need to go back using the standard font??????
Currently working on Taboo Hearts :D
Currently working on Forbidden :D

rayminator
Miko-Class Veteran
Posts: 754
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Fonts

#2 Post by rayminator » Tue Apr 03, 2018 11:50 am

in gui,rpy

look for

Code: Select all

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

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

## The font used for out-of-game text.
define gui.interface_text_font = "DejaVuSans.ttf"
then copy it then put # to cancel it then paste it then change the DejaVuSans.ttf to the one that you want use
then after you test it or done with it delete it and remove the # from the original fonts that you have cancel out.

User avatar
DragonKnight
Regular
Posts: 51
Joined: Sun Nov 12, 2017 10:16 am
Projects: Taboo Hearts
Contact:

Re: Fonts

#3 Post by DragonKnight » Tue Apr 03, 2018 12:06 pm

Hmmm. I need to change between them. I need one font for a particular thing, and then I need another yelling and I need a dejavusan for normal text.....
Currently working on Taboo Hearts :D
Currently working on Forbidden :D

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Fonts

#4 Post by Imperf3kt » Tue Apr 03, 2018 3:40 pm

The simplest way is to put your other font in the game folder and simply use the font tag in your script.

Code: Select all

    e "I hate you."
    e "{font="hate.ttf"}I really hate you.{/font}
"hate.ttf" being the name of the font you are using.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

User avatar
DragonKnight
Regular
Posts: 51
Joined: Sun Nov 12, 2017 10:16 am
Projects: Taboo Hearts
Contact:

Re: Fonts

#5 Post by DragonKnight » Tue Apr 03, 2018 5:50 pm

See if it works!!
Currently working on Taboo Hearts :D
Currently working on Forbidden :D

User avatar
DragonKnight
Regular
Posts: 51
Joined: Sun Nov 12, 2017 10:16 am
Projects: Taboo Hearts
Contact:

Re: Fonts

#6 Post by DragonKnight » Tue Apr 03, 2018 6:12 pm

This don't work

Code: Select all

    e "I hate you."
    e "{font="bloodlust.ttf"}I really hate you.{/font}"
Don't know why but i doesn't work.
Currently working on Taboo Hearts :D
Currently working on Forbidden :D

rayminator
Miko-Class Veteran
Posts: 754
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Fonts

#7 Post by rayminator » Tue Apr 03, 2018 7:10 pm

remove the "

here a example from the documentation
The font tag renders the text between itself and its closing tag in the specified font. The argument is the filename of the font to use

Code: Select all

"Try out the {font=mikachan.ttf}mikachan font{/font}."

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Fonts

#8 Post by Imperf3kt » Tue Apr 03, 2018 8:20 pm

Oops yeah, my mistake on that.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

User avatar
DragonKnight
Regular
Posts: 51
Joined: Sun Nov 12, 2017 10:16 am
Projects: Taboo Hearts
Contact:

Re: Fonts

#9 Post by DragonKnight » Wed Apr 04, 2018 3:31 am

Thanks!!!!! How you control the size of it??
Currently working on Taboo Hearts :D
Currently working on Forbidden :D

User avatar
DragonKnight
Regular
Posts: 51
Joined: Sun Nov 12, 2017 10:16 am
Projects: Taboo Hearts
Contact:

Re: Fonts

#10 Post by DragonKnight » Wed Apr 04, 2018 5:12 am

Figured out!!!! Solved
Currently working on Taboo Hearts :D
Currently working on Forbidden :D

Post Reply

Who is online

Users browsing this forum: mold.FF