Seperate Fonts Per Character

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
Kestrel
Newbie
Posts: 1
Joined: Tue May 18, 2010 12:57 pm
Contact:

Seperate Fonts Per Character

#1 Post by Kestrel »

Is there any way to get a character to speak in a font different than the others? For example, if you had a character that spoke an "unknown language" and their dialogue appeared as wingdings?

duanemoody
Regular
Posts: 100
Joined: Fri Oct 02, 2009 2:32 pm
Projects: American Jurassic
Organization: Pier 7 Media
Location: Arizona
Contact:

Re: Seperate Fonts Per Character

#2 Post by duanemoody »

If all you're aiming for is having a character speak in dingbats, most of them were incorporated into unicode and therefore are likely to appear in the default font Ren'Py uses (Vera Sans).

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Seperate Fonts Per Character

#3 Post by PyTom »

One annoying bit is that they appear as high characters, rather than just being different shapes for the ascii characters. So you have to use the unicode escapes (like \u26a3) to get at them.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: Seperate Fonts Per Character

#4 Post by Aleema »

To answer your question, you can give characters their own font when you define them:

Code: Select all

$ a = Character("Adam", font="myfont.tff")

billybobfred
Newbie
Posts: 1
Joined: Sat Dec 11, 2010 10:53 pm
Contact:

Re: Seperate Fonts Per Character

#5 Post by billybobfred »

Aleema wrote:To answer your question, you can give characters their own font when you define them:

Code: Select all

$ a = Character("Adam", font="myfont.tff")
So, I also want to have a character that speaks in a different font, only when I did that thing you just said, it made their name have a different font, not their speech.

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: Seperate Fonts Per Character

#6 Post by Aleema »

Intriguing! I rarely use that function.

Use "what_font" instead of "font" and it should work.

Post Reply

Who is online

Users browsing this forum: Google [Bot]