MZ Glitch messing up with the fonts

A new glitch has crept in. I've been testing a game for weeks and this had never occurred before. I don't know if it happened because of a core update, or a visustella one. I'm not sure anything has been added/updated besides these two.
But anyway, any clue what could be messing up with the letters like this? Anyone ever had it before?

glitch.png
it is extremely unlikely that it's a plugin that is messing up - plugins don't work that way.

either the font file has been damaged - unlikely because another word uses the p correctly
or the event data itself in the json has been damaged - have you tried deleting and rewriting that sentence?
or it could be something on the display driver if that had been updated.

it could also be a damaged RAM cell on the display hardware - especially if that is blinking (which wouldn't be visible in a screenshot). And it seems as if you painted on the letter - can you give a screenshot of only that section and without drawing on it, so that we can see the error display better?

does it happen elsewhere or only in that single show text?
does it happen elsewhere or only in that single show text?

Elsewhere, unfortunately. I tested that game for a long time and never had it a single time. Suddenly it started appearing at random places.
The letter is not blinking and nothing has been painted on it either, it really is as it is.

I'm not sure about drivers, clearly I didn't touch them, but I suppose there always could have been some automatic updates.
The I suggest downloading and reinstalling the correct driver for your display card(s).
But manually downloading and installing, not using the automated driver update as that can be set wrong.

Reinstalling the correct driver can't damage anything, but it can repair a number of problems.
and if it doesn't change the effect, then search for different causes.

does your computer have one or two display chips? If you have different display chips for 2D/3D then this can be a wrong setting
I looked for updates for display adapters and it said the best drivers are already installed...

does your computer have one or two display chips?

No idea. But there was no glitch at all using that font up to a certain point, so...
I looked for updates for display adapters and it said the best drivers are already installed
I specifically said to NOT use the automated windows driver update.
If the error is due to the driver, that automated "search for better" will NEVER work again.

What you need to do is to look up your computer specifications, see who build your display chip/card, go to their website and download and install that driver, no matter what windows claims the currently installed driver is.

If on your car one of your tires is defective and flat, you go to the car dealer and ask for a new tire and the answer is "But you already have the best tire we ever sold" - do you stop at that and keep the flat tire, or do you demand to replace it anyway because it is flat and defective?


Again, check your computer specifications instead of guessing

if you don't have it written, go to the device manager and see if it lists one or two display adapters/cards
Actually I have an earlier version of the game which doesn't have the glitch, and this version uses a (slightly) older set of Visustella. With this set there is no glitch (or at least not on the dialogue I tested).

1647265723516.png


But with this set there is a glitch, on the same dialogue. The 2 versions of the game are like one week apart and I don't remember anything else being changed.

1647265756840.png
did you update the NW.js or pixi.js between those to versions?
regular plugins should not be able to cause such problems because they should not go that deep into the display functions, but if something changed the display engine itself, then there can be such an effect.
did you update the NW.js or pixi.js between those to versions?

I don't think I've done that. Pixi-filters.js gets updated at the same time as the whole set, if this is the same thinkg as pixi.js
Not sure how to update NW.js...?
I just realised that you never answered to another suggestion I made above, one that could still be a possibility with this new information:
or the event data itself in the json has been damaged - have you tried deleting and rewriting that sentence?
Yup I did. The glitch is not "rare", it creeps in easily in every 2 or 3 dialogues. Generally only one letter, 2 max, but it's there regularly.
I made a full game with this font and never had this issue a single time, I also tested about 80% of another game and up until 2-3 days I had never run into something like that either. It's really new and doesn't affect old backups of said games. Even if you check the exact same dialogue.
that doesn't make any sense from a technological point of view - we are both missing another influence involved there that would cause it.
Yep it's a very difficult one to understand :dizzy:
I'll playtest a bit longer for now and see if it comes to me.
But the whole concept of some fonts getting messed up here and there... urgh :dizzy:
Hi there!

1 - One way to find the problem is really to deactivate all the plugins and keep testing them one by one.
Turn it on, test the game.
Turn another one, and test the game. etc...

2 - A faster way is also to get a new project, without any plugins, put your font there with the same game resolution, and see if the error happens.
If it does, then indeed is a plugin. And now you will probably need to follow step 1 to find the culprit.

It can be something related to the calculation of the text width. That happens, in a lower level, on the Bitmap class. But also when creating the text-state on the Windows class.

If their code was not obfuscated, you could take a look at them to see what plugins modify these functions, and you can start by deactivating all of them, instead of your whole plugin manager. But that also only works if the problem is true with a plugin.

Just for curiosity, when the error happens, can you try open the console log and type:
SceneManager._scene._messageWindow.width to check the width value of the message window. And also the height: SceneManager._scene._messageWindow.height

I had a similar problem building a plugin, and the cause was that my window was with a width containing decimal values (243.54 for example).
Not sure if this is what you mean, but I get this:

1647336596470.png
open the console.log as above window and tab console.

than copy paste those lines (1 by 1) into the console and
see what the output of the numbers are:

SceneManager._scene._messageWindow.width
SceneManager._scene._messageWindow.height
Maybe this will be a silly attempt, but have you tried to download that font from a different source?
I'm not a specialist in how fonts work in general, but downloading font file from a more reliable website could solve your problem.

Forgot to ask, is this a font in TTF format or OTF? (check extension in fonts folder)
@ShadowDragon
Thanks!

SceneManager._scene._messageWindow.width
SceneManager._scene._messageWindow.height

816
168
Seems pretty normal to me.

Maybe this will be a silly attempt, but have you tried to download that font from a different source?
I'm not a specialist in how fonts work in general, but downloading font file from a more reliable website could solve your problem.

Forgot to ask, is this a font in TTF format or OTF? (check extension in fonts folder)

This font has always worked normally up until recently. And more importantly it still works properly with older versions of the games, at least I haven't run into similar glitches when I tried.
And more importantly it still works properly with older versions of the games
One thought:
It is always the same font, but it is always the same fontfile?
if you copied the font into the project to make it available to anyone after deployment, then the different games will be loading different (copied) fontfiles of the same font.
and if only one of those fontfiles is damaged, that would explain this behaviour.
Unfortunately this doesn't fix the problem.

What's odd is that I ran an autostart with some dialogues and got some font glitches (as expected).
But when the autostart looped for a second time, there were DIFFERENT glitches.
And a 3rd loop gave yet another set of different glitches, never at the same place.

What could be causing that??

It's also hard to identify the culprit, because the glitches seemingly pop up randomly, and there are so many different core versions of MZ (1.4.3, 1.3.3 etc) and Visustella, plus a few other non-VS plugins in the mix (including Community Lighting). All I know is that it's only in March I started to experience those glitches, and before that I had made a full MZ game and tested 80% of another one. Something must have happened there.

So I'm asking, on a purely theoretical basis: what could be causing that??

Original thread: https://forums.rpgmakerweb.com/threads/glitch-messing-up-with-the-fonts.145758/