Changing fonts for specific Characters? [Resolved]

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
numituwi
Newbie
Posts: 12
Joined: Tue Sep 26, 2017 12:15 am
Completed: Pink Lens, Red Hands
Projects: Keep Your Head On!
Tumblr: numituwi
itch: numitumi
Location: USA
Contact:

Changing fonts for specific Characters? [Resolved]

#1 Post by numituwi » Sat Oct 07, 2017 9:03 pm

Good evening! I am still new to using Ren'py. I made my first game without customizing the GUI so for my new game I want play around with interface.

That said, I am currently having issues with the font. I managed to change the DejaVuSans font to my desired main game font in the gui.rpy, but I'm having difficulty changing fonts for different characters (A robot and the villain).

In another thread from 2010, user sake-bento stated that you'd have to use this code for different character fonts ->

$ art = Character("King Arthur", what_font="MyFont.ttf")

I'm not sure if I put the code in the wrong place (before label start. It did not work after label start though), or if it's incompatible with the recently updated Ren'py.

Thank you for reading!
Last edited by numituwi on Sun Oct 08, 2017 1:57 pm, edited 1 time in total.

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Changing fonts for specific Characters?

#2 Post by Remix » Sun Oct 08, 2017 6:35 am

Presuming the font exists as that name within the main game folder, just swap to using define

Code: Select all

define art = Character("King Arthur", what_font="MyFont.ttf")
#
#
label start:
    art "Does it work?"
Frameworks & Scriptlets:

User avatar
numituwi
Newbie
Posts: 12
Joined: Tue Sep 26, 2017 12:15 am
Completed: Pink Lens, Red Hands
Projects: Keep Your Head On!
Tumblr: numituwi
itch: numitumi
Location: USA
Contact:

Re: Changing fonts for specific Characters?

#3 Post by numituwi » Sun Oct 08, 2017 1:56 pm

Remix wrote:
Sun Oct 08, 2017 6:35 am
Presuming the font exists as that name within the main game folder, just swap to using define

Code: Select all

define art = Character("King Arthur", what_font="MyFont.ttf")
#
#
label start:
    art "Does it work?"
You're a life saver! Thank you!

Post Reply

Who is online

Users browsing this forum: Google [Bot], _ticlock_