Custom font

Amanda Jackson

Veteran
Veteran
Joined
Aug 13, 2013
Messages
31
Reaction score
1
First Language
English
Primarily Uses
Hi, is there a way to use a custom font in a game so that it works even if the person playing the game doesn't have that font installed on their computer? Thanks.
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
Hi, is there a way to use a custom font in a game so that it works even if the person playing the game doesn't have that font installed on their computer? Thanks.
I'm pretty sure you have to have a copy of the font packaged with the game.
 

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Hi, is there a way to use a custom font in a game so that it works even if the person playing the game doesn't have that font installed on their computer? Thanks.
You'll need to create a folder named "Fonts" with the custom font inside.  This will allow the game to draw from the folder without any installation needed on the player's part.  You will also need to change the font in game as well via a script snippet somewhere above Main :

Font.default_name = ["CustomFontName"] 

Font.default_size = Number  Where Number is a positive integer

 

 

@ Iron Croc Yes



I believe you need the brackets though.  I could be mistaken.  
 
Last edited by a moderator:

Simon D. Aelsi

Voice Actor/Composer
Veteran
Joined
Feb 22, 2014
Messages
4,838
Reaction score
1,394
First Language
Hylian
Primarily Uses
RMVXA
You'll need to create a folder named "Fonts" with the custom font inside.  This will allow the game to draw from the folder without any installation needed on the player's part.  You will also need to change the font in game as well via a script snippet somewhere above Main :

Font.default_name = ["CustomFontName"] 

Font.default_size = Number  Where Number is a positive integer
Kinda like this? 

Code:
Font.default_name = "Font Name"Font.default_size = 28
 

Amanda Jackson

Veteran
Veteran
Joined
Aug 13, 2013
Messages
31
Reaction score
1
First Language
English
Primarily Uses
I already did that. I had a folder called Fonts with the correct font there, and the Main script was properly modified. But still people are having problems with the font if it's not installed to their computers.
 

Hailren

Title Screen Master. Rpg Maker Artist.
Veteran
Joined
Aug 3, 2013
Messages
179
Reaction score
61
First Language
English
Primarily Uses
I had the same problem you have to look in the font's file and see the full exact name of the fonts if its not exact then it wont work. 

Example:

Untitled.jpg

Untitled 2.jpg 
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
the Main script was properly modified.
If it were properly modified, then it would work - if it doesn't work, then it's not properly modified.
The most commonly error is that a lot of people place the font's filename into the script - but as the poster above stated, it needs the font name, NOT the font filename...
 

Amanda Jackson

Veteran
Veteran
Joined
Aug 13, 2013
Messages
31
Reaction score
1
First Language
English
Primarily Uses
Ah, that makes sense. How about when copying a font file creates several separate files? For example in my game I copied a font and it actually produced a whole set of different font files. How should I rename the rest? Do I only need the main one?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
you never rename fontfiles - why do you ask?


And the fonts with multiple files are exactly why you need to use the font name and not the filename


Which one you need depends on which exact font variant you want - if you open the font files in a font viewer, you'll see that they have different font names.
 

Amanda Jackson

Veteran
Veteran
Joined
Aug 13, 2013
Messages
31
Reaction score
1
First Language
English
Primarily Uses
That's exactly what I did. I had the font name in the script, not the file name. Even so, I still encounter the problem.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
show us how you typed the font name and link us to the font file, then we can check what you made wrong.
 

Amanda Jackson

Veteran
Veteran
Joined
Aug 13, 2013
Messages
31
Reaction score
1
First Language
English
Primarily Uses
I don't know how to link to a font file. The font I used was Bradley Hand ITC, and that's the name in the Main script I used. The filename is ITCBLKAD and it involves many other seemingly unimportant files that were transferred with it.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
You need to upload the font file somewhere if you don't have any link ready from where you got the font, and then provide a link to it.

And I asked you to tell us how exactly you wrote the line in the script, like this:

Code:
Font.default_name = "Font Name"
Spaces, capitalisation, where you placed the " - all that can be the error, and because of that we need the exact code you used, down to the last letter, and not you simply telling us what you guess how you wrote that line...
 

Amanda Jackson

Veteran
Veteran
Joined
Aug 13, 2013
Messages
31
Reaction score
1
First Language
English
Primarily Uses
This is my code: Font.default_name = ["Bradley Hand ITC"]

This is the link to the font: Link
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
somehow you mixed up your fontfiles, because when I opened that fontfile ITCBLKAD.TTF that you linked, I got a font named "Blackadder ITC".


Please check for the correct font file, you need not only have the correct name for the font, it also needs to have the file with that fontname in the project font directory...
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
This is my code: Font.default_name = ["Bradley Hand ITC"]
Sorry, I didn't realized it beforeWhere do the brackets come from?

all the posters above told you to use a command like

Font.default_name = "Bradley Hand ITC"No one ever told you to place that in brackets...Check if it works if you remove the brackets
 

cremnophobia

Veteran
Veteran
Joined
Dec 10, 2013
Messages
216
Reaction score
97
Primarily Uses
Wrong. Not all posters said that! But yeah, omit the square brackets. It won't make a real difference here. (The reason that they can be used here is actually a misfeature which is documented in the help file, if anyone cares.)

Here's a sample project. It works on my computer and I don't see a reason why it shouldn't on yours, too. Please check it.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top