Custom Text Function Working Sometimes

I am relatively new to Javascript in the way I need to be for RPG Maker.  I have a function to write text in a different font for headers.

Window_Base.prototype.drawHeaderText = function (text, x, y, maxWidth, align) { this.contents.fontFace = 'HeaderFont'; this.contents.fontSize = 34; this.contents.drawText(text, x, y, maxWidth, this.lineHeight(), align); this.resetFontSettings();};This works just fine when being called from inside of a Window_Base function as such.

Window_Base.prototype.drawActorNameForMenu = function (actor, x, y, width) { width = width || 168; this.changeTextColor(this.hpColor(actor)); this.drawHeaderText(actor.name(), x, y, width);};My issue is that when using it like this it doesn't work.

function Window_Chapter() { this.initialize.apply(this, arguments);}Window_Chapter.prototype = Object.create(Window_Base.prototype);Window_Chapter.prototype.constructor = Window_Chapter;Window_Chapter.prototype.initialize = function (x, y) { var width = 500; var height = 100; Window_Base.prototype.initialize.call(this, x, y, width, height); this.refresh();};Window_Chapter.prototype.refresh = function () { this.drawHeaderText('text', 0, 0, 500, 'left'); //////////////////////THIS LINE};drawText() works just fine.  drawHeaderText() still draws the text, but ignores the font and font size I am trying to set and draws the text in a basic font (not the default font for the project, looks like Times).

This is a simple thing of I do not know what I don't know.  Can anyone help me understand what I am messing up?
I am now noticing that the next appears in the default font the first time the menu is opened and in the correct font every time thereafter.

Original thread: https://forums.rpgmakerweb.com/threads/custom-text-function-working-sometimes.52174/