Custom Fonts Tutorial

Magixe

(∩ᄑ_ᄑ)⊃━☆゚*・。*・:≡( ε:)
Veteran
Joined
Feb 15, 2016
Messages
48
Reaction score
23
First Language
English
Primarily Uses
N/A
Have you ever wanted to use your own font for your game, and then had no idea how to do it? Fear not, I was once in the same boat! It is quite simple. Okay.


Step 1. Find/create your font. Make sure it's in a TTF (TrueTypeFont) format; a .ttf file.


Step 2. Copy and paste this file into your "fonts" folder in your game project folder.


Step 3. Open gamefont.css in your editing program of choice, like Notepad++ or TextWrangler. I use Editra.


Step 4: Change the existing code to this:


@font-face {
    font-family: GameFont;
    src: url("yourfonthere.ttf");
}


Step 5. Replace yourfonthere.ttf with your font's file name.


Step 6. Save and close gamefont.css.


Step 7. Make sure that if you are using Yanfly's Core Engine (or any other plugin that changes your game's font) that your default font is GameFont. If not, you're all set.


Step 8. Playtest your game to see your font in action!


WARNING: If you aren't using Word Wrap, then your wrapping in your text boxes might be messed up depending on your font's width. But if you use Word Wrap you're fine.


Step 9. Watch your beautiful game come to life!


--Magixe
 
Last edited by a moderator:

Shytoad

May never find a good Avatar
Member
Joined
Dec 12, 2018
Messages
16
Reaction score
1
First Language
English
Primarily Uses
RMVXA
I can't find the gamefont.css file?
 

Padramyr

Veteran
Veteran
Joined
May 22, 2017
Messages
95
Reaction score
75
First Language
German
Primarily Uses
RMMV
I can't find the gamefont.css file?
I'm not sure if you still need help. You find the .css file in the same folder where the font is located. So navigate to your game and go into "fonts". There should be a file named gamefont.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top