Changing fonts for RMMV

I know how to change the font for a specific window class BUT...
The problem that I ran into is that the Window_GameEnd and Window_Help classes do not want to cooperate with me.

Basically, if I run this code:
Window_GameEnd.prototype.resetFontSettings = function() {
Window_Base.prototype.resetFontSettings.call(this);
this.contents.fontFace = 'spacgi__';
this.contents.fontSize = 28;
The font will not change while for different Window classes like Window_MenuCommand,
the font did change.

If anyone can tell me why that happens, TY in advance
Code:
Window_GameEnd.prototype.resetFontSettings = function() {
    this.contents.fontFace = 'spacgi__';
    this.contents.fontSize = 28;
    this.resetTextColor();

this should do the trick (specially when colors are in play, you want
to reset them too.

while its part of Window_Base, you don't need to call it.
It's a little hard to tell, since what you've posted is not full code...if the rest of the method is unchanged then I think it should work. It depends how and where you "run this code": best to do it in a plugin, so it is reliably applied when the game boots up.

I don't believe @ShadowDragon's suggestion will make any difference because the base reset calls resetTextColor, which shouldn't be reverted by setting the font face/size.

I'd suggest using something like this as a plugin (paste into a text editor, save with .js extension):
JavaScript:
/*:
 * @target MV
 * @plugindesc Game font changes.
 * @help Free to use and/or modify for any project, no credit required.
 */
Window_GameEnd.prototype.standardFontFace = function() { return "spacgi__"; };
Window_GameEnd.prototype.standardFontSize = function() { return 28; };
(Note for MZ users: this is only for MV.)

Also, if you're using any other plugins, you can turn them off, save your project to apply Plugin Manager changes, then test to see if that helps.
It's a little hard to tell, since what you've posted is not full code...if the rest of the method is unchanged then I think it should work. It depends how and where you "run this code": best to do it in a plugin, so it is reliably applied when the game boots up.

I don't believe @ShadowDragon's suggestion will make any difference because the base reset calls resetTextColor, which shouldn't be reverted by setting the font face/size.

I'd suggest using something like this as a plugin (paste into a text editor, save with .js extension):
JavaScript:
/*:
 * @target MV
 * @plugindesc Game font changes.
 * @help Free to use and/or modify for any project, no credit required.
 */
Window_GameEnd.prototype.standardFontFace = function() { return "spacgi__"; };
Window_GameEnd.prototype.standardFontSize = function() { return 28; };
(Note for MZ users: this is only for MV.)

Also, if you're using any other plugins, you can turn them off, save your project to apply Plugin Manager changes, then test to see if that helps.
Yeah, it's part of a plugin I quickly made so it runs immediately as the game launches.
Thank you though, I'll try this out.

Can confirm that this didn't work even after creating a new project, placing YEP_LoadCustomFonts and your plugin.

The usual window classes (GameEnd, TitleCommand, Status, Options etc) did not want to cooperate while everything else worked as intended.

Here is MenuCommand working properly:
1741897251578.png


Here is GameEnd not working properly:
1741897301435.png


Still don't know why these Window classes do not want to cooperate.

Can confirm that this didn't work even after creating a new project, placing YEP_LoadCustomFonts and your plugin.

The usual window classes (GameEnd, TitleCommand, Status, Options etc) did not want to cooperate while everything else worked as intended.

Here is MenuCommand working properly:
1741897251578.png


Here is GameEnd not working properly:
1741897301435.png


Still don't know why these Window classes do not want to cooperate.
Ok nevermind, I now understand how this works. (partially)

I found out really late that if a Window class doesn't "exist", the code inside the plugin stops running as soon as it reaches the missing Window class.

What I mean by a Window not existing is for example, while using YEP_StatusMenuCore, implement the Window classes from StatusMenuCore (StatusCommand, StatusInfo) inside the plugin you provided, stop using StatusMenuCore for x reasons and that's where problems start arising.

The code is trying to return a value to nothing because after I stop using StatusMenuCore,
the Window classes that come with the plugin itself also stop existing.

I think the solution to this problem would be to add a condition where the plugin checks
if a Window class exists or not.
If the Window class doesn't exist, the code jumps to the next Window class and checks if the next one exists without stopping immediately after running into a missing Window class.
Window_GameEnd does exist already.
there is a plugin that can change font in each window as well.

like Eli_FontManager as one of it.

others like to cached current font, change font => restore font as previous.
if your font should be the same in ALL windows, you can change the game.css
in the font folder to target the font you want to use.
Window_GameEnd does exist already.
there is a plugin that can change font in each window as well.

like Eli_FontManager as one of it.

others like to cached current font, change font => restore font as previous.
if your font should be the same in ALL windows, you can change the game.css
in the font folder to target the font you want to use.
Yeah, GameEnd already exists by default in rpg_windows.

I found a solution and instead of putting default Window classes and custom-made Window classes in the same plugin, I made a plugin that would handle the font change process for default Window classes found in rpg_windows.

The second plugin would handle custom-made Window classes that anyone can find in plugins like YEP_StatusMenuCore, YEP_OptionsCore and YEP_SaveCore.

I don't want to use a single font for the whole game, that's why I'm editing Window classes in the first place but I will take a look at Eli_FontManager, thanks

Edit: Eli_FontManager fixed all of my problems now I can continue without problems
glad it solved all your problems, PKD has one too (limited to one unless bought).
Eli's MV are free, so it would be the better way to give.

good luck with your project further 🙂

Original thread: https://forums.rpgmakerweb.com/threads/changing-fonts-for-rmmv.176189/