Font check?

Does anyone know if it's possible to have a conditional event check what font you're using? I have Yanfly and SumRndmDde's plugins for fonts and messages, but I can't find anything that would let me check to see which particular font the player is using at the moment.
For example, I want to have a deaf character who only responds if you're using the ASL fingerspelling font.
Unusual request...
I don't get what do you mean by this :
check to see which particular font the player is using at the moment.

So I want to make it clear...
Do you want the game to check wether the player have a certain font installed on their PC ?

Well, if that's so then the method is Graphics.isFontLoaded('font name')
eventing.JPG


Otherwise, if you actually mean in your game the player is able to change their font, then you could just simply using a switch whenever you change font.

Changing the message box font through plugin doesn't mean changing the base font used for the entire game. If you insist though, it require us to study the plugins you are currently using.
Ah, sorry! I'll try to be clearer. Rather than checking for if a font is installed, what I'm looking for is a way to check what font is currently in use in the game.
So if the player can choose between fonts A and B, I want to be able to set a conditional branch to where if font A is active then X happens, but if font B then Y happens.

SumRndmDde's plugin lets the player choose their font from the options menu and lets you have a font be enabled by a switch (i.e. unlock a font with switches based on game events), but there's nothing there to let me set a switch when the player changes the font.
Sure. Have it so that when the player choses the font, it sets a variable to a certain number. For example, if they choose font A, the variable = 1, font b = 2, etc. Then in the conditional branch, just set it to check that variable.
Have it so that when the player choses the font, it sets a variable to a certain number.

That seems like a fairly neat solution. How do I make that happen? Do I need to add something into the actual plugin, since choosing the font isn't evented?
Just checked that plugin. It's not the kind of plugin that allow user to change font through the game, but add an option to allow player to choose the font. The kind that friendly to the player, but not to the user.

This is rather a roundaway solution. I will collaborate with @mlogan idea. Let's just mod it a bit by binding it with a variable.
  • Open the plugin js, CTRL+F, then search for fontFace
  • It shall bring you here :
    Code:
    Window_Base.prototype.loadOptionsFont = function() {
        if(_.fonts[_.index]) {
            this.contents.fontFace = _.names[_.index];
        }
    };
  • Add new line just below it : $gameVariables.setValue(varID, _.index);
  • Change the varID to variable ID you want to bind.
  • Should be like this :
    Code:
    Window_Base.prototype.loadOptionsFont = function() {
        if(_.fonts[_.index]) {
            this.contents.fontFace = _.names[_.index];
            $gameVariables.setValue(10, _.index);
        }
    };
  • The variable ID should then be bound to the font ID the player currently using.
Thank you so much!! I'll work on this tonight, see if I can get the mechanic working.

Original thread: https://forums.rpgmakerweb.com/threads/font-check.94784/