Help - Search - Members - Calendar
Full Version: [Scripting]How to Change Font in VX Game
RPG RPG Revolution Forums > Scripting > Script Tutorials > RGSS2
woratana
How to Change Font in VX Game
by Woratana

Introduction
When I tried making the VX game in Trial, I don't feel like the font that comes with game (UmePlus Gothic).
(I don't hate it, but I just prefer other font.)

And finally I found way to do, so I want to share this with anyone who want to use other font in RMVX game~

(It's same solution as when you change font in RMXP. You can skip this tutorial if you how to do that already. laugh.gif )
Solution
First, open Script Editor (F11) and go to "Main" (It's the latest script).

Place this script:
CODE
Font.default_name = "Font_Name"
Font.default_size = Font_size

You can place it anywhere before this line:
CODE
$scene = Scene_Title.new

(I like to put it after begin, but it's not matter you put it before or after begin)

Replace Font_Name with Name of the font
Replace Font_size with the size of font you want

For example, I want to change font to Tahoma and size 20
CODE
Font.default_name = "Tahoma"
Font.default_size = 20


Some screenshot when you changed the font:




something I've to tell you more is in Main, you will found this script
CODE
unless Font.exist?("UmePlus Gothic")
  print "UmePlus Gothic フォントが見つかりません。"
  exit
end

This will check if the computer has font "UmePlus Gothic". If not, the game will close.
So, when you changed the font, you may want to delete those 4 lines.

==========================
Some Features to decorate Font
It's similar to the features in RMXP. But I want to share in case someone didn't know about that wink.gif

The place to put these scripts are same as when you change the font.
CODE
Font.default_bold = true/false

Make the bold text

CODE
Font.default_italic = true/false

Make the italic text

CODE
Font.default_shadow = true/false

Make the text with shadow. << When you start game, the shadow automatically = true.
(BB Code cannot make the shadow text happy.gif )
^ RMXP don't have Shadow, so this will not work in XP

CODE
Font.default_color = Color.new(Red, Green, Blue, Opacity)

Change text color
e.g. Default color when game starts is...
CODE
Font.default_color = Color.new(255, 255, 255, 255)


You can find RGB color from this page:
http://web.njit.edu/~kevin/rgb.txt.html
Take a look at column R;G;B Dec.

===========================

I hope this tutorial will help laugh.gif
SeeYouAlways
Hey, thank you so much for the submission! I have posted this on the main site (well, I redirected it to it, anyway). Hope to see more tutorials - I had no idea how to change the font because I didn't use RPG Maker XP. pinch.gif
darkkyros
Thanks! This really helped me.
Xyster
yay, I can finally change the text, which was really bothering me honestly...

Though now if I could only change it to a differnt font than Tahoma....I just need to figure out which ones work. I think I settled on Georgia though, I like the looks of it.
Endzeit
Not working for me =\ When I try to change it it just gives me squares instead of characters. *sigh* Too much of a newb I guess tongue.gif
SeeYouAlways
Hmm, tell us what font you are using.
Endzeit
Trying to use Tahoma as the tutorial says.

*edit*

Nevermind I figured it out lol. The font changed but I havn't changed the values (actor names, items, vocabulary, etc) So yeah... Dumb.
neclords
This Is Very Cool..

I Like it! biggrin.gif
Rory
I think UmePlus Gothic goes very well with RMVX.
Gilvs
I have Rpg maker XP but i't in wierd lettering and I can't read it.Plus it won't let me make a game can you make a tutorial for it plz? mellow.gif.also how do you script for Rpg maker xp. huh.gif .[font="Impact"][/font][color="#006400"][/color]
woratana
QUOTE (Gilvs @ Jan 27 2008, 08:16 AM) *
I have Rpg maker XP but i't in wierd lettering and I can't read it.Plus it won't let me make a game can you make a tutorial for it plz? mellow.gif.also how do you script for Rpg maker xp. huh.gif .[font="Impact"][/font][color="#006400"][/color]

Just do the same thing laugh.gif

CODE
Font.default_name = "Tahoma"
Font.default_size = 20


and you can use all the features to decorate the font in RMXP, except for shadow.
lahandi
I hope you dont mind if I asked a question smile.gif

Can we make the message font bold / italic in certain word? Something like : You got Amulet of Fire .
And I wonder if we can change color of certain word? Something like : Aranos ask you to go to Volasium

I think it will create a good and catchy visual style for our story. Because in long story / dialogue, player just skimming the dialogue and then they forget where to go or whose to find. And I think, giving an emphasize to spesific name or item will make the story easily understood.
Rickster090
can i put the font file into a folder in my game so if someone doesn'tm have it installed it will run any way???

and im trying to use a font from 101 free fonts.com and everywhere where there is supposed to be writting it is blank
ERZENGEL
@Rickster: You can create a folder called Fonts in your project folder and then you insert the fontfile(s) into it. So no installation is need to use the font.
Rickster090
yh i've don that and i've downloaded a new font for 101 free fonts, heres the script im using
CODE
#==============================================================================
# ** Main
#------------------------------------------------------------------------------
#  After defining each class, actual processing begins here.
#==============================================================================
Font.default_name = "BLACKNIT"
Font.default_size = 20
Font.default_bold = true
Font.default_shadow = true
begin
  Graphics.freeze
    $scene = Scene_Title.new
  $scene.main while $scene != nil
  Graphics.transition(30)
rescue Errno::ENOENT
  filename = $!.message.sub("No such file or directory - ", "")
  print("Unable to find file #{filename}.")
end
and all the lettering is gone there are no words please can you help.
YanXie
Most likely "BLACKNIT" is the file names,not the font file name.To make sure you use correct name for the font,open the file,and look at "Typeface name:______".That "_____" is what you should put for the font name.

ヽ(ー`)ノ

cheers,puppeto4. smile.gif
Rickster090
YES!!!!!!! thank you ever soo much ...

-Edit- never mind sorted out problem by pming the guy who made this tutorial
woratana
Updated!!!

- Add code to change default text's color smile.gif
Rickster090
humm i've tryied this but this dosn't work
woratana
You can try this way too smile.gif

http://www.rpgrevolution.com/forums/?showtopic=10151

Check first post and puppeto's post~
amaziah
is there a way to change the color of the font in mid sentence? like if you wanted to highlight a word or something?
woratana
For the message box,

Type \c[color ID] to change color smile.gif

Here's color ID list:
(It may change if you are using different windowskin, but I don't think anyone who create windowskin will change that smile.gif )


Thanks to Puppeto smile.gif
Zinos666
Here's the font style I'm using and I don't see any problem with it.
woratana
I can't see any problem with it either tongue.gif
Apkx24
my rpg maker vx doesnt have Font.default_name....
i checked in main and pretty much every script
woratana
You've to add that line, it's not in normal script >_>~
EvenAngels
Oh wow. I was thinking of changing the font in my game pretty soon. Thanks for putting this up here. Much obliged.

EvenAngels
Klasher
Yay, very helpfull biggrin.gif, Thanks thumbsup.gif
griva001
Is there a way to use diferent types of fonts in each windows?
Exampple:
Menu Status : Arial
Menu Item : Tahoma
Scene battle: Verdana
????
please help, I have a one in XP but I can't find one for VX
liteleaf
Thank you sooooooooo much!!!
I've been looking for this for ages happy.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.