Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How to change font?

I went through all the '.font.name =' pieces and changed it into the font that I want using a variable, but I still have the boring Arial (I think?) font in the menu's, etc. o_O

I remember a script being around a little while back, that was also used to fix the font when using the illegal/japanese version or something.

Any help appreciated. ^^
 
At Window_Base:
Code:
 

class Window_Base < Window

  def initialize(x, y, width, height)

  ....

  self.contents.font.name = 'your font name'

  ....

 

or at Main:
Code:
 

  Font.default_name = 'your font name'

 

Personally, I prefer to edit main, but... wait, you want to use variable?
 
If you want to use some global variable for setting font name.. In the Main:
Code:
 

$defaultfonttype = $fontface = $fontname = Font.default_name = 'your font name'

$defaultfontsize = $fontsize = Font.default_size = 22

 
Like this? (Sometimes, I'm too lazy to remove all the $fontface from the script I got)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top