[SOLVED] Specifying font for Character object

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
nerupuff
Veteran
Posts: 211
Joined: Sat Dec 02, 2017 2:24 am
Contact:

[SOLVED] Specifying font for Character object

#1 Post by nerupuff »

I have one character who uses a specific font for his own dialogue and I find that individually coding each line of dialogue with (sample):

Code: Select all

"Try out the {font=mikachan.ttf}mikachan font{/font}."
I've tried specifying the character object as such, but I don't see any font tag usage for character objects in Ren'Py documentation:

Code: Select all

define NM = Character(None, kind=nvl, font="/fonts/Kingthings_Printingkit.ttf")
There are no error codes, but when I launch the project, it does not reflect the font specified and uses the default font. Help? Maybe there is something that I am missing.
Last edited by nerupuff on Thu Mar 21, 2019 5:50 am, edited 1 time in total.
ImageImage
Hire me for proofreading, editing, and (maybe) writing! ♡ Check here!

User avatar
Wight
Regular
Posts: 47
Joined: Mon Jan 07, 2019 5:40 pm
Completed: A Transient Experiment
itch: wight
Contact:

Re: Specifying font for Character object?

#2 Post by Wight »

Try "what_font" instead. The "what_" prefix affects the dialogue, and the "who_" prefix affects the character's name.

Code: Select all

define NM = Character(None, kind=nvl, what_font="/fonts/Kingthings_Printingkit.ttf")
https://www.renpy.org/doc/html/dialogue.html#Character
Down to where it says Styling Text and Windows, it gives an example with who_color

User avatar
nerupuff
Veteran
Posts: 211
Joined: Sat Dec 02, 2017 2:24 am
Contact:

Re: Specifying font for Character object?

#3 Post by nerupuff »

Ah, thank you so much, Wight! That really helped a bunch and it's up and working now. Marking this as solved. ^^
ImageImage
Hire me for proofreading, editing, and (maybe) writing! ♡ Check here!

Post Reply

Who is online

Users browsing this forum: Google [Bot]