Moghunter HUD's not loading custom fonts

Hey guys,

So I'm using SRD's Font Option plugin on one of my projects and I have just noticed that Moghunters HUD plugins don't seem to take any notice of changes to the game font when changed through SRD's plugin, which can look jarring. They seem to use the font called upon in your Gamefont text file exclusively.

Would anyone be able to point me in the right direction of how to possibly get Mog's HUD's loading the font chosen in SRD's font option plugin? Any help would be greatly appreciated.

Both Plugin files are in spoilers below.

Spoiler: Moghunter Action Name Plugin
//=============================================================================
// MOG_ActionName.js
//=============================================================================

/*:
* @plugindesc (v1.0) Apresenta uma janela com nome da ação.
* @author Moghunter
*
* @param Layout X-Axis
* @desc Posição X-Axis do layout.
* @Default 420
*
* @param Layout Y-Axis
* @desc Posição Y-Axis do layout.
* @Default 64
*
* @param Name X-Axis
* @desc Posição X-Axis do Nome.
* @Default 0
*
* @param Name Y-Axis
* @desc Posição Y-Axis do Nome.
* @Default 24
*
* @param Icon X-Axis
* @desc Posição X-Axis do Ícone.
* @Default 0
*
* @param Icon Y-Axis
* @desc Posição Y-Axis do Ícone.
* @Default -4
*
* @param Font Size
* @desc Definição do tamanho da fonte.
* @Default 22
*
* @Help
* =============================================================================
* +++ MOG - Action Name (v1.0) +++
* By Moghunter
* https://atelierrgss.wordpress.com/
* =============================================================================
* Apresenta uma janela com nome da ação.
* Será necessário ter o arquivo. (img/system/)
*
* ActionName.png
*
* =============================================================================
* Desativar o Nome
* =============================================================================
* Inicialmente todas as ações terão o nome ativado, no caso de querer desativar
* algum nome, utilize o comentário abaixo na caixa de notas do Item/Habilidade.
*
* Disable Name
*
*/

//=============================================================================
// ** PLUGIN PARAMETERS
//=============================================================================
  var Imported = Imported || {};
  Imported.MOG_ActionName = true;
  var Moghunter = Moghunter || {};

 Moghunter.parameters = PluginManager.parameters('MOG_ActionName');
Moghunter.skillName_x = Number(Moghunter.parameters['Layout X-Axis'] || 420);
Moghunter.skillName_y = Number(Moghunter.parameters['Layout Y-Axis'] || 64);
Moghunter.skillName_name_x = Number(Moghunter.parameters['Name X-Axis'] || 0);
Moghunter.skillName_name_y = Number(Moghunter.parameters['Name Y-Axis'] || 24);
Moghunter.skillName_icon_x = Number(Moghunter.parameters['Icon X-Axis'] || 0);
Moghunter.skillName_icon_y = Number(Moghunter.parameters['Icon Y-Axis'] || -4);
Moghunter.skillName_FontSize = Number(Moghunter.parameters['Font Size'] || 22);

//=============================================================================
// ** Game Temp
//=============================================================================

//==============================
// * Initialize
//==============================
var _alias_mog_skillname_initialize = Game_Temp.prototype.initialize
Game_Temp.prototype.initialize = function() {
_alias_mog_skillname_initialize.call(this);
this._skillNameData = [false,null,false];
};

//=============================================================================
// ** Battle Manager
//=============================================================================

//==============================
// ** Start Action
//==============================
var _mog_skillName_bmngr_startAction = BattleManager.startAction;
BattleManager.startAction = function() {
this.setSkillName();
_mog_skillName_bmngr_startAction.call(this);
};

//==============================
// * set Skill Name
//==============================
BattleManager.setSkillName = function() {
if (!this._subject.currentAction() || !this._subject.currentAction().item()) {return};
var item = this._subject.currentAction().item();
var notes = item.note.split(/[\r\n]+/);
var enableName = true;
notes.forEach(function(note) {
if (note == "Disable Name" ) {enableName = false};
},this);
if (enableName) {$gameTemp._skillNameData = [true,item,true]};
};

//==============================
// * End Turn
//==============================
var _mog_skillName_bmngr_endAction = BattleManager.endAction;
BattleManager.endAction = function() {
_mog_skillName_bmngr_endAction.call(this);
$gameTemp._skillNameData = [false,null,false];
};

//=============================================================================
// ** SpritesetBattle
//=============================================================================

//==============================
// * create Pictures
//==============================
var _mog_skillName_sprbattle_createPictures = Spriteset_Battle.prototype.createPictures;
Spriteset_Battle.prototype.createPictures = function() {
this._spriteSkillName = new SpriteSkillName();
this.addChild(this._spriteSkillName);
_mog_skillName_sprbattle_createPictures.call(this);
};

//=============================================================================
// * Sprite Skill Name
//=============================================================================
function SpriteSkillName() {
this.initialize.apply(this, arguments);
};

SpriteSkillName.prototype = Object.create(Sprite.prototype);
SpriteSkillName.prototype.constructor = SpriteSkillName;

//==============================
// * Initialize
//==============================
SpriteSkillName.prototype.initialize = function() {
Sprite.prototype.initialize.call(this);
this.loadImages();
this.createLayout();
this.createName();
this.createIcon();
};

//==============================
// * Load Images
//==============================
SpriteSkillName.prototype.loadImages = function() {
this._iconImg = ImageManager.loadSystem("IconSet");
this._layoutImg = ImageManager.loadSystem("ActionNameA");
};

//==============================
// * Item
//==============================
SpriteSkillName.prototype.item = function() {
return $gameTemp._skillNameData[1];
};

//==============================
// * is Visible
//==============================
SpriteSkillName.prototype.isVisible = function() {
return $gameTemp._skillNameData[2];
};

//==============================
// * get Name Data
//==============================
SpriteSkillName.prototype.getNameData = function() {
this._nameData = [0,0,0,0];
this._nameData[0] = this._layoutImg.width;
this._nameData[1] = Math.floor(this._layoutImg.height / 3);
this._nameData[2] = Moghunter.skillName_x;
this._nameData[3] = Moghunter.skillName_y;
this._name.bitmap = new Bitmap(160,32);
this._name.bitmap.fontSize = Moghunter.skillName_FontSize;
this._name.y = this._nameData[3] + Moghunter.skillName_name_y;
this._icon.x = this._nameData[2] + Moghunter.skillName_icon_x;
this._icon.y = this._nameData[3] + Moghunter.skillName_icon_y;
};

//==============================
// * refresh Skill Name
//==============================
SpriteSkillName.prototype.refreshSkillName = function() {
$gameTemp._skillNameData[0] = false;
this._name.bitmap.clear();
this._layout.opacity = 0;
if (!this.item()) {return};
var text = this.item().name;
var textsize = ((text.length * 7) + this._nameData[0]);
var wsize = (Math.min(Math.max(textsize,48),160));
var wposX = ((wsize / 2) + Math.floor(this._nameData[0] / 2));
for (var i = 0; i < this._layout.length; i++) {
this._layout.x = this._nameData[2];
this._layout.y = this._nameData[3];
if (i === 0) {
this._layout.setFrame(0,0,this._nameData[0],this._nameData[1]);
this._layout.x -= wposX;
} else if (i === 1) {
this._layout.setFrame(0,this._nameData[1],this._nameData[0],this._nameData[1]);
this._layout.x += wposX;
} else {
this._layout.setFrame(0,this._nameData[1] * 2,this._nameData[0],this._nameData[1]);
this._layout.scale.x = wsize / this._nameData[0];
};
};
this._name.bitmap.drawText(this.item().name,0,0,160,32,"center")
this._name.x = this._nameData[2] + Moghunter.skillName_name_x;
var w = Window_Base._iconWidth;
var h = Window_Base._iconHeight;
var sx = this.item().iconIndex % 16 * w;
var sy = Math.floor(this.item().iconIndex / 16) * h;
this._icon.setFrame(sx,sy,w,h);
};

//==============================
// * create Layout
//==============================
SpriteSkillName.prototype.createLayout = function() {
this._layout = [];
for (var i = 0; i < 3; i++) {
this._layout = new Sprite(this._layoutImg);
this._layout.anchor.x = 0.5;
this._layout.opacity = 0;
this._layout.z = 20;
this.addChild(this._layout);
};
};

//==============================
// * create Name
//==============================
SpriteSkillName.prototype.createName = function() {
this._name = new Sprite();
this._name.x = this._layout[0].x + Moghunter.skillName_name_x;
this._name.y = this._layout[0].y + Moghunter.skillName_name_y;
this._name.anchor.x = 0.5;
this._name.z = 21;
this._name.opacity = 0;
this.addChild(this._name);

};

//==============================
// * create Icon
//==============================
SpriteSkillName.prototype.createIcon = function() {
this._icon = new Sprite(this._iconImg);
this._icon.x = this._layout[0].x + Moghunter.skillName_icon_x;
this._icon.y = this._layout[0].y + Moghunter.skillName_icon_y;
this._icon.anchor.x = 0.5;
this._icon.z = 21;
this._icon.opacity = 0;
this.addChild(this._icon);
};

//==============================
// * Update
//==============================
SpriteSkillName.prototype.updateVisible = function() {
if (this.isVisible()) {
this._layout[0].opacity += 20;
} else {
this._layout[0].opacity -= 20;
};
for (var i = 1; i < this._layout.length; i++) {
this._layout.opacity = this._layout[0].opacity;
};
this._name.opacity = this._layout[0].opacity;
this._icon.opacity = this._layout[0].opacity;
};

//==============================
// * Update
//==============================
SpriteSkillName.prototype.update = function() {
Sprite.prototype.update.call(this);
if (!this._nameData) {
if (this._layoutImg.isReady()) {this.getNameData()};
return;
};
if ($gameTemp._skillNameData[0]) {this.refreshSkillName()};
this.updateVisible();
};


Spoiler: SRD's Font Option Plugin
/*:
* @plugindesc Adds a Font selector to the Options Window that allows the Player to choose a Font for the game.
* @author SumRndmDde
*
* @param Option Name
* @desc The name used by the Font option.
* @Default Text Font
*
* @param Position
* @desc The position of the option in the Options Window.
* Choices are: Top, Middle, Bottom
* @Default Middle
*
* @param == Default Font ==
* @Default
*
* @param Default Font Name
* @desc The name that appears in the Options Window for the default Font.
* @Default Default
*
* @param == Font 1 ==
* @Default
*
* @param Font 1 File
* @desc Input the file name of the Font in /fonts/ that will be Font 1.
* @Default
*
* @param Font 1 Name
* @desc The name that appears in the Options Window for Font 1.
* @Default
*
* @param Font 1 Switch
* @desc The Switch ID that must be ON for Font 1 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 2 ==
* @Default
*
* @param Font 2 File
* @desc Input the file name of the Font in /fonts/ that will be Font 2.
* @Default
*
* @param Font 2 Name
* @desc The name that appears in the Options Window for Font 2.
* @Default
*
* @param Font 2 Switch
* @desc The Switch ID that must be ON for Font 2 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 3 ==
* @Default
*
* @param Font 3 File
* @desc Input the file name of the Font in /fonts/ that will be Font 3.
* @Default
*
* @param Font 3 Name
* @desc The name that appears in the Options Window for Font 3.
* @Default
*
* @param Font 3 Switch
* @desc The Switch ID that must be ON for Font 3 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 4 ==
* @Default
*
* @param Font 4 File
* @desc Input the file name of the Font in /fonts/ that will be Font 4.
* @Default
*
* @param Font 4 Name
* @desc The name that appears in the Options Window for Font 4.
* @Default
*
* @param Font 4 Switch
* @desc The Switch ID that must be ON for Font 4 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 5 ==
* @Default
*
* @param Font 5 File
* @desc Input the file name of the Font in /fonts/ that will be Font 5.
* @Default
*
* @param Font 5 Name
* @desc The name that appears in the Options Window for Font 5.
* @Default
*
* @param Font 5 Switch
* @desc The Switch ID that must be ON for Font 5 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 6 ==
* @Default
*
* @param Font 6 File
* @desc Input the file name of the Font in /fonts/ that will be Font 6.
* @Default
*
* @param Font 6 Name
* @desc The name that appears in the Options Window for Font 6.
* @Default
*
* @param Font 6 Switch
* @desc The Switch ID that must be ON for Font 6 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 7 ==
* @Default
*
* @param Font 7 File
* @desc Input the file name of the Font in /fonts/ that will be Font 7.
* @Default
*
* @param Font 7 Name
* @desc The name that appears in the Options Window for Font 7.
* @Default
*
* @param Font 7 Switch
* @desc The Switch ID that must be ON for Font 7 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 8 ==
* @Default
*
* @param Font 8 File
* @desc Input the file name of the Font in /fonts/ that will be Font 8.
* @Default
*
* @param Font 8 Name
* @desc The name that appears in the Options Window for Font 8.
* @Default
*
* @param Font 8 Switch
* @desc The Switch ID that must be ON for Font 8 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 9 ==
* @Default
*
* @param Font 9 File
* @desc Input the file name of the Font in /fonts/ that will be Font 9.
* @Default
*
* @param Font 9 Name
* @desc The name that appears in the Options Window for Font 9.
* @Default
*
* @param Font 9 Switch
* @desc The Switch ID that must be ON for Font 9 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 10 ==
* @Default
*
* @param Font 10 File
* @desc Input the file name of the Font in /fonts/ that will be Font 10.
* @Default
*
* @param Font 10 Name
* @desc The name that appears in the Options Window for Font 10.
* @Default
*
* @param Font 10 Switch
* @desc The Switch ID that must be ON for Font 10 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 11 ==
* @Default
*
* @param Font 11 File
* @desc Input the file name of the Font in /fonts/ that will be Font 11.
* @Default
*
* @param Font 11 Name
* @desc The name that appears in the Options Window for Font 11.
* @Default
*
* @param Font 11 Switch
* @desc The Switch ID that must be ON for Font 11 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 12 ==
* @Default
*
* @param Font 12 File
* @desc Input the file name of the Font in /fonts/ that will be Font 12.
* @Default
*
* @param Font 12 Name
* @desc The name that appears in the Options Window for Font 12.
* @Default
*
* @param Font 12 Switch
* @desc The Switch ID that must be ON for Font 12 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 13 ==
* @Default
*
* @param Font 13 File
* @desc Input the file name of the Font in /fonts/ that will be Font 13.
* @Default
*
* @param Font 13 Name
* @desc The name that appears in the Options Window for Font 13.
* @Default
*
* @param Font 13 Switch
* @desc The Switch ID that must be ON for Font 13 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 14 ==
* @Default
*
* @param Font 14 File
* @desc Input the file name of the Font in /fonts/ that will be Font 14.
* @Default
*
* @param Font 14 Name
* @desc The name that appears in the Options Window for Font 14.
* @Default
*
* @param Font 14 Switch
* @desc The Switch ID that must be ON for Font 14 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 15 ==
* @Default
*
* @param Font 15 File
* @desc Input the file name of the Font in /fonts/ that will be Font 15.
* @Default
*
* @param Font 15 Name
* @desc The name that appears in the Options Window for Font 15.
* @Default
*
* @param Font 15 Switch
* @desc The Switch ID that must be ON for Font 15 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 16 ==
* @Default
*
* @param Font 16 File
* @desc Input the file name of the Font in /fonts/ that will be Font 16.
* @Default
*
* @param Font 16 Name
* @desc The name that appears in the Options Window for Font 16.
* @Default
*
* @param Font 16 Switch
* @desc The Switch ID that must be ON for Font 16 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 17 ==
* @Default
*
* @param Font 17 File
* @desc Input the file name of the Font in /fonts/ that will be Font 17.
* @Default
*
* @param Font 17 Name
* @desc The name that appears in the Options Window for Font 17.
* @Default
*
* @param Font 17 Switch
* @desc The Switch ID that must be ON for Font 17 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 18 ==
* @Default
*
* @param Font 18 File
* @desc Input the file name of the Font in /fonts/ that will be Font 18.
* @Default
*
* @param Font 18 Name
* @desc The name that appears in the Options Window for Font 18.
* @Default
*
* @param Font 18 Switch
* @desc The Switch ID that must be ON for Font 18 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 19 ==
* @Default
*
* @param Font 19 File
* @desc Input the file name of the Font in /fonts/ that will be Font 19.
* @Default
*
* @param Font 19 Name
* @desc The name that appears in the Options Window for Font 19.
* @Default
*
* @param Font 19 Switch
* @desc The Switch ID that must be ON for Font 19 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 20 ==
* @Default
*
* @param Font 20 File
* @desc Input the file name of the Font in /fonts/ that will be Font 20.
* @Default
*
* @param Font 20 Name
* @desc The name that appears in the Options Window for Font 20.
* @Default
*
* @param Font 20 Switch
* @desc The Switch ID that must be ON for Font 20 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 21 ==
* @Default
*
* @param Font 21 File
* @desc Input the file name of the Font in /fonts/ that will be Font 21.
* @Default
*
* @param Font 21 Name
* @desc The name that appears in the Options Window for Font 21.
* @Default
*
* @param Font 21 Switch
* @desc The Switch ID that must be ON for Font 21 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 22 ==
* @Default
*
* @param Font 22 File
* @desc Input the file name of the Font in /fonts/ that will be Font 22.
* @Default
*
* @param Font 22 Name
* @desc The name that appears in the Options Window for Font 22.
* @Default
*
* @param Font 22 Switch
* @desc The Switch ID that must be ON for Font 22 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 23 ==
* @Default
*
* @param Font 23 File
* @desc Input the file name of the Font in /fonts/ that will be Font 23.
* @Default
*
* @param Font 23 Name
* @desc The name that appears in the Options Window for Font 23.
* @Default
*
* @param Font 23 Switch
* @desc The Switch ID that must be ON for Font 23 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 24 ==
* @Default
*
* @param Font 24 File
* @desc Input the file name of the Font in /fonts/ that will be Font 24.
* @Default
*
* @param Font 24 Name
* @desc The name that appears in the Options Window for Font 24.
* @Default
*
* @param Font 24 Switch
* @desc The Switch ID that must be ON for Font 24 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 25 ==
* @Default
*
* @param Font 25 File
* @desc Input the file name of the Font in /fonts/ that will be Font 25.
* @Default
*
* @param Font 25 Name
* @desc The name that appears in the Options Window for Font 25.
* @Default
*
* @param Font 25 Switch
* @desc The Switch ID that must be ON for Font 25 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 26 ==
* @Default
*
* @param Font 26 File
* @desc Input the file name of the Font in /fonts/ that will be Font 26.
* @Default
*
* @param Font 26 Name
* @desc The name that appears in the Options Window for Font 26.
* @Default
*
* @param Font 26 Switch
* @desc The Switch ID that must be ON for Font 26 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 27 ==
* @Default
*
* @param Font 27 File
* @desc Input the file name of the Font in /fonts/ that will be Font 27.
* @Default
*
* @param Font 27 Name
* @desc The name that appears in the Options Window for Font 27.
* @Default
*
* @param Font 27 Switch
* @desc The Switch ID that must be ON for Font 27 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 28 ==
* @Default
*
* @param Font 28 File
* @desc Input the file name of the Font in /fonts/ that will be Font 28.
* @Default
*
* @param Font 28 Name
* @desc The name that appears in the Options Window for Font 28.
* @Default
*
* @param Font 28 Switch
* @desc The Switch ID that must be ON for Font 28 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 29 ==
* @Default
*
* @param Font 29 File
* @desc Input the file name of the Font in /fonts/ that will be Font 29.
* @Default
*
* @param Font 29 Name
* @desc The name that appears in the Options Window for Font 29.
* @Default
*
* @param Font 29 Switch
* @desc The Switch ID that must be ON for Font 29 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 30 ==
* @Default
*
* @param Font 30 File
* @desc Input the file name of the Font in /fonts/ that will be Font 30.
* @Default
*
* @param Font 30 Name
* @desc The name that appears in the Options Window for Font 30.
* @Default
*
* @param Font 30 Switch
* @desc The Switch ID that must be ON for Font 30 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 31 ==
* @Default
*
* @param Font 31 File
* @desc Input the file name of the Font in /fonts/ that will be Font 31.
* @Default
*
* @param Font 31 Name
* @desc The name that appears in the Options Window for Font 31.
* @Default
*
* @param Font 31 Switch
* @desc The Switch ID that must be ON for Font 31 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 32 ==
* @Default
*
* @param Font 32 File
* @desc Input the file name of the Font in /fonts/ that will be Font 32.
* @Default
*
* @param Font 32 Name
* @desc The name that appears in the Options Window for Font 32.
* @Default
*
* @param Font 32 Switch
* @desc The Switch ID that must be ON for Font 32 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 33 ==
* @Default
*
* @param Font 33 File
* @desc Input the file name of the Font in /fonts/ that will be Font 33.
* @Default
*
* @param Font 33 Name
* @desc The name that appears in the Options Window for Font 33.
* @Default
*
* @param Font 33 Switch
* @desc The Switch ID that must be ON for Font 33 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 34 ==
* @Default
*
* @param Font 34 File
* @desc Input the file name of the Font in /fonts/ that will be Font 34.
* @Default
*
* @param Font 34 Name
* @desc The name that appears in the Options Window for Font 34.
* @Default
*
* @param Font 34 Switch
* @desc The Switch ID that must be ON for Font 34 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 35 ==
* @Default
*
* @param Font 35 File
* @desc Input the file name of the Font in /fonts/ that will be Font 35.
* @Default
*
* @param Font 35 Name
* @desc The name that appears in the Options Window for Font 35.
* @Default
*
* @param Font 35 Switch
* @desc The Switch ID that must be ON for Font 35 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 36 ==
* @Default
*
* @param Font 36 File
* @desc Input the file name of the Font in /fonts/ that will be Font 36.
* @Default
*
* @param Font 36 Name
* @desc The name that appears in the Options Window for Font 36.
* @Default
*
* @param Font 36 Switch
* @desc The Switch ID that must be ON for Font 36 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 37 ==
* @Default
*
* @param Font 37 File
* @desc Input the file name of the Font in /fonts/ that will be Font 37.
* @Default
*
* @param Font 37 Name
* @desc The name that appears in the Options Window for Font 37.
* @Default
*
* @param Font 37 Switch
* @desc The Switch ID that must be ON for Font 37 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 38 ==
* @Default
*
* @param Font 38 File
* @desc Input the file name of the Font in /fonts/ that will be Font 38.
* @Default
*
* @param Font 38 Name
* @desc The name that appears in the Options Window for Font 38.
* @Default
*
* @param Font 38 Switch
* @desc The Switch ID that must be ON for Font 38 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 39 ==
* @Default
*
* @param Font 39 File
* @desc Input the file name of the Font in /fonts/ that will be Font 39.
* @Default
*
* @param Font 39 Name
* @desc The name that appears in the Options Window for Font 39.
* @Default
*
* @param Font 39 Switch
* @desc The Switch ID that must be ON for Font 39 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 40 ==
* @Default
*
* @param Font 40 File
* @desc Input the file name of the Font in /fonts/ that will be Font 40.
* @Default
*
* @param Font 40 Name
* @desc The name that appears in the Options Window for Font 40.
* @Default
*
* @param Font 40 Switch
* @desc The Switch ID that must be ON for Font 40 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 41 ==
* @Default
*
* @param Font 41 File
* @desc Input the file name of the Font in /fonts/ that will be Font 41.
* @Default
*
* @param Font 41 Name
* @desc The name that appears in the Options Window for Font 41.
* @Default
*
* @param Font 41 Switch
* @desc The Switch ID that must be ON for Font 41 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 42 ==
* @Default
*
* @param Font 42 File
* @desc Input the file name of the Font in /fonts/ that will be Font 42.
* @Default
*
* @param Font 42 Name
* @desc The name that appears in the Options Window for Font 42.
* @Default
*
* @param Font 42 Switch
* @desc The Switch ID that must be ON for Font 42 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 43 ==
* @Default
*
* @param Font 43 File
* @desc Input the file name of the Font in /fonts/ that will be Font 43.
* @Default
*
* @param Font 43 Name
* @desc The name that appears in the Options Window for Font 43.
* @Default
*
* @param Font 43 Switch
* @desc The Switch ID that must be ON for Font 43 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 44 ==
* @Default
*
* @param Font 44 File
* @desc Input the file name of the Font in /fonts/ that will be Font 44.
* @Default
*
* @param Font 44 Name
* @desc The name that appears in the Options Window for Font 44.
* @Default
*
* @param Font 44 Switch
* @desc The Switch ID that must be ON for Font 44 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 45 ==
* @Default
*
* @param Font 45 File
* @desc Input the file name of the Font in /fonts/ that will be Font 45.
* @Default
*
* @param Font 45 Name
* @desc The name that appears in the Options Window for Font 45.
* @Default
*
* @param Font 45 Switch
* @desc The Switch ID that must be ON for Font 45 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 46 ==
* @Default
*
* @param Font 46 File
* @desc Input the file name of the Font in /fonts/ that will be Font 46.
* @Default
*
* @param Font 46 Name
* @desc The name that appears in the Options Window for Font 46.
* @Default
*
* @param Font 46 Switch
* @desc The Switch ID that must be ON for Font 46 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 47 ==
* @Default
*
* @param Font 47 File
* @desc Input the file name of the Font in /fonts/ that will be Font 47.
* @Default
*
* @param Font 47 Name
* @desc The name that appears in the Options Window for Font 47.
* @Default
*
* @param Font 47 Switch
* @desc The Switch ID that must be ON for Font 47 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 48 ==
* @Default
*
* @param Font 48 File
* @desc Input the file name of the Font in /fonts/ that will be Font 48.
* @Default
*
* @param Font 48 Name
* @desc The name that appears in the Options Window for Font 48.
* @Default
*
* @param Font 48 Switch
* @desc The Switch ID that must be ON for Font 48 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 49 ==
* @Default
*
* @param Font 49 File
* @desc Input the file name of the Font in /fonts/ that will be Font 49.
* @Default
*
* @param Font 49 Name
* @desc The name that appears in the Options Window for Font 49.
* @Default
*
* @param Font 49 Switch
* @desc The Switch ID that must be ON for Font 49 to be accessable. Leave blank to always allow.
* @Default
*
* @param == Font 50 ==
* @Default
*
* @param Font 50 File
* @desc Input the file name of the Font in /fonts/ that will be Font 50.
* @Default
*
* @param Font 50 Name
* @desc The name that appears in the Options Window for Font 50.
* @Default
*
* @param Font 50 Switch
* @desc The Switch ID that must be ON for Font 50 to be accessable. Leave blank to always allow.
* @Default
*
* @Help
*
* Font Option
* Version 1.01
* SumRndmDde
*
*
* This Plugin adds a Font selector to the Options Window that allows
* the Player to choose a Font for the game.
*
*
* ==============================================================================
* How to Set up the Images
* ==============================================================================
*
* First place all of the Font files you wish to use in:
*
* /fonts/
*
* The default font file (mplus-1m-regular.ttf) should remain within the folder!
*
*
* ==============================================================================
* How to Set up the Options
* ==============================================================================
*
* Next, in order to set up the order and the names for the Fonts in the
* Options Menu, you must use the Parameters.
*
* It is manadatory that one Font at least the default font should exist!
* Using the "Default Font Name" Parameter, you can give that font a specific
* name when selected in the Options Menu.
*
*
* Next, you can set up the choices by filling out the "Font" sections.
*
* Using "Font # File", input the name of a Font file (including extension) from
* the fonts folder!
*
* Next, use "Font # Name", set the name of that Font that will be displayed
* in the Options Menu. This will also be the name of the font that can be
* accessed using other plugins, so similarly, this can be used to preload
* fonts.
*
*
* Once you have filled out both Parameters for one "Font" section,
* it will be available in the Options Menu in game.
*
*
* ==============================================================================
* Switches
* ==============================================================================
*
* If you wish for a Font option to only be available once a Switch is turned
* ON, input the Switch's ID within the "Font # Switch" Parameter.
*
* Once done, that Switch must be turned ON for that Font to appear!
*
* Use this to create unlockable or purchasable fonts!
*
*
* ==============================================================================
* End of Help File
* ==============================================================================
*
* Welcome to the bottom of the Help file.
*
*
* Thanks for reading!
* If you have questions, or if you enjoyed this Plugin, please check
* out my YouTube channel!
*
* https://www.youtube.com/c/SumRndmDde
*
*
* Until next time,
* ~ SumRndmDde
*
*/

var SRD = SRD || {};
SRD.FontOption = SRD.FontOption || {};

var Imported = Imported || {};
Imported["SumRndmDde Font Option"] = 1.01;

(function(_) {

"use strict";

//-----------------------------------------------------------------------------
// SRD.FontOption
//-----------------------------------------------------------------------------

const params = PluginManager.parameters('SRD_FontOption');

_.name = String(params['Option Name']);
_.position = String(params['Position']).trim().toLowerCase();

_.defaultName = String(params['Default Font Name']);

_.index = 0;
_.lowest = 0;
_.fonts = [""];
_.names = [_.defaultName];
_.switches = [0];
for(var i = 1; i <= 50; i++) {
var file = String(params['Font ' + i + ' File']);
var name = String(params['Font ' + i + ' Name']);
var swit = parseInt(params['Font ' + i + ' Switch']);
if(file.trim().length > 0 && name.trim().length > 0) {
_.fonts = file;
_.names = name;
Graphics.loadFont(name, 'fonts/' + file);
}
if(swit) _.switches = swit;
}

_.fixIndex = function() {
while((_.switches[_.index] && _.switches[_.index] != 0) && (!$gameSwitches || !$gameSwitches.value(_.switches[_.index]))) {
_.index++;
if(_.index > _.fonts.length - 1) _.index = 0;
}
};

_.changeIndex = function(value) {
_.index = Number(value).clamp(_.lowest, _.fonts.length - 1);
while((_.switches[_.index] && _.switches[_.index] != 0) && (!$gameSwitches || !$gameSwitches.value(_.switches[_.index]))) {
_.index++;
if(_.index > _.fonts.length - 1) _.index = 0;
}
};

_.refreshAllWindows = function() {
const scene = SceneManager._scene;
if(scene && scene._windowLayer) {
const layer = scene._windowLayer;
if(!layer.children) return;
layer.children.forEach(function(win) {
win.resetFontSettings();
if(win.refresh) win.refresh();
})
}
};

//-----------------------------------------------------------------------------
// ConfigManager
//-----------------------------------------------------------------------------

Object.defineProperty(ConfigManager, 'fontStyle', {
get: function() {
_.fixIndex();
return _.index;
},
set: function(value) {
_.changeIndex(value);
_.refreshAllWindows();
},
configurable: true
});

_.ConfigManager_makeData = ConfigManager.makeData;
ConfigManager.makeData = function() {
var config = _.ConfigManager_makeData.call(this);
config.fontStyle = this.fontStyle;
return config;
};

_.ConfigManager_applyData = ConfigManager.applyData;
ConfigManager.applyData = function(config) {
_.ConfigManager_applyData.call(this, config);
this.fontStyle = this.readFontStyle(config, 'fontStyle');
};

ConfigManager.readFontStyle = function(config, name) {
var value = config[name];
if (value !== undefined) {
return value;
} else {
return _.lowest;
}
};

//-----------------------------------------------------------------------------
// Window_Base
//-----------------------------------------------------------------------------

_.Window_Base_resetFontSettings = Window_Base.prototype.resetFontSettings;
Window_Base.prototype.resetFontSettings = function() {
_.Window_Base_resetFontSettings.apply(this, arguments);
this.loadOptionsFont();
};

Window_Base.prototype.loadOptionsFont = function() {
if(_.fonts[_.index]) {
this.contents.fontFace = _.names[_.index];
}
};

//-----------------------------------------------------------------------------
// Window_Options
//-----------------------------------------------------------------------------

_.Window_Options_addGeneralOptions = Window_Options.prototype.addGeneralOptions;
Window_Options.prototype.addGeneralOptions = function() {
_.Window_Options_addGeneralOptions.call(this);
if(_.position === 'middle') {
this.addCommand(_.name, 'fontStyle');
}
};

_.Window_Options_makeCommandList = Window_Options.prototype.makeCommandList;
Window_Options.prototype.makeCommandList = function() {
if(_.position === 'top') {
this.addCommand(_.name, 'fontStyle');
}
_.Window_Options_makeCommandList.call(this);
};

_.Window_Options_addVolumeOptions = Window_Options.prototype.addVolumeOptions;
Window_Options.prototype.addVolumeOptions = function() {
_.Window_Options_addVolumeOptions.call(this);
if(_.position === 'bottom') {
this.addCommand(_.name, 'fontStyle');
}
};

_.Window_Options_statusText = Window_Options.prototype.statusText;
Window_Options.prototype.statusText = function(index) {
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
if(this.isFontSymbol(symbol)) {
return this.fontStyleStatusText(value);
}
return _.Window_Options_statusText.call(this, index);
};

Window_Options.prototype.isFontSymbol = function(symbol) {
return symbol === 'fontStyle';
};

Window_Options.prototype.fontStyleStatusText = function(value) {
return _.names[value];
};

_.Window_Options_processOk = Window_Options.prototype.processOk;
Window_Options.prototype.processOk = function() {
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
_.Window_Options_processOk.call(this);
if(this.isFontSymbol(symbol)) {
value += 1;
if(value >= _.fonts.length) value = _.lowest;
this.changeValue(symbol, value);
}
};

_.Window_Options_cursorRight = Window_Options.prototype.cursorRight;
Window_Options.prototype.cursorRight = function(wrap) {
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
_.Window_Options_cursorRight.call(this, wrap);
if(this.isFontSymbol(symbol)) {
value += 1;
this.changeValue(symbol, value);
}
};

_.Window_Options_cursorLeft = Window_Options.prototype.cursorLeft;
Window_Options.prototype.cursorLeft = function(wrap) {
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
_.Window_Options_cursorLeft.call(this, wrap);
if(this.isFontSymbol(symbol)) {
value -= 1;
this.changeValue(symbol, value);
}
};

})(SRD.FontOption);


Regards,
Will

Original thread: https://forums.rpgmakerweb.com/threads/moghunter-huds-not-loading-custom-fonts.78589/