can I change the font of Centered text

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
Guest

can I change the font of Centered text

#1 Post by Guest »

Is there a way that I can change the font of centered text? sorry am new to this and did a search but couldn't find anything.

also I am using nvl mode if it makes a difference

Code: Select all

 centered "how are you" with dissolve
  

Guest

Re: can I change the font of Centered text

#2 Post by Guest »

sorry, or in the show text line?


eg

Code: Select all

scene black
show text "I want to change the font of this line." with dissolve
$ renpy.pause(1.0)
hide text with dissolve

Alessio
Miko-Class Veteran
Posts: 576
Joined: Fri May 07, 2004 9:40 am
Completed: GO! Magical Boy (2006), Angelic Orbs (soundtrack)
Projects: Cyberlin (in progress)
Location: Finland
Contact:

Re: can I change the font of Centered text

#3 Post by Alessio »

Maybe this helps:
http://www.renpy.org/wiki/renpy/doc/ref ... #Text_Tags
# {font=filename.ttf}text{/font} renders the enclosed text in the supplied font.
Current projects: Visual Novel "Cyberlin"

Guest

Re: can I change the font of Centered text

#4 Post by Guest »

Alessio wrote:Maybe this helps:
http://www.renpy.org/wiki/renpy/doc/ref ... #Text_Tags
# {font=filename.ttf}text{/font} renders the enclosed text in the supplied font.

thanx

worked for 'show text' line but not for 'centered'

but is fine for me

thanks again.

Aenakume
Regular
Posts: 182
Joined: Mon Aug 11, 2008 4:38 am
Projects: Arts... i hate arts -_-
Contact:

Re: can I change the font of Centered text

#5 Post by Aenakume »

To use centered (which, depending on what you're doing, might be a good idea) or "show text" with a different font, you just need to use style.centered_text. Just put this in your init block:

Code: Select all

$ style.centered_text.font = "filename.ttf"
Saves putting "{font=..." in every single call.
“You can lead a fool to wisdom, but you cannot make him think.”

Post Reply

Who is online

Users browsing this forum: Google [Bot]