MZ Glitch messing up with the fonts

can you show us a screenshot of that autorun event?
because I just realised you never showed what produced the error.
and if the position/kind of distortion changes with the same message, it cannot be the fontfile but there seems to be a timing problem involved somehow.
glitch6.png


glitch6b.png
and how is that common event called?
1647348933737.png
if you switch off the autorun directly, does the glitch still happen?

that is exactly the situation I remembered as being problematical - show text inside a looping autorun/parallel process.
and if this is the same despite being a common event, the effects should stop as soon as the loop is gone.

Could be wrong however - the cases I remembered all had a single show text directly in the loop, not the dozens of your common event.
do you have any plugins that can alter font at start or midgame?
or a plugin that uses a fontname for the entire game?

or did you alter the font.css to run a different font?

if you used the last one, could you return it to the default one
for a test purpose or a different font to see if it causes the same
effect of the glitch?

if the other fonts has the same issue, it would be not the font file
or the font name.
I don't think I'm doing any of these things but keep in mind something important, the glitch only popped up very recently, on a game I'd been working on for weeks.
What changed between now and a month ago, when things were still working properly: some visustella updates, and a core version update (1.3.3 to 1.4.3). I don't recall any other modification made on the game's system. I also wonder if it could be a computer problem but right now I've only got one so I cannot test that possibility.

Looking it up close, here is what the glitch looks like:

g8a.png

(yeah I know, ironic choice of word)

g8b.png


So it looks like something is darkening some parts of the letters... why and how, I dunno.
It looks like it's doing two passes: I'm guessing the dark area is related to the text outline. Out of curiosity, if you try saving this as a .js file and importing as a plugin (loaded after all your other plugins), how does that change the text appearance in-game?
JavaScript:
/*:
 * @target MZ
 * @plugindesc Removes text outlines.
 * @help Terms of use: free to use and/or modify for any project.
 */
Bitmap.prototype._drawTextOutline = function(text, tx, ty, maxWidth) {};

I'm no expert on this, but here are some more ideas:
  1. Have you restarted your system since you started seeing the problem?

  2. You can change the Font Size on the System 2 tab in the database; if you change it to, for example, 1 pt higher or lower, does that affect the problem? Some HTML Canvas text rendering glitches may only occur at certain scales.

  3. Does the problem stop if you turn off all plugins, save your project, and test from a New Game? If so, that suggests the plugins you're using are necessary for the problem to occur. E.g. plugins can override the text-drawing methods in the core scripts and/or change available rendering properties of the game's HTML.

  4. I assume you've changed the font via the Main Font Filename setting on the System 2 tab of the database. If you swap out the font for another one, does the problem disappear? If so, the font file or its format (e.g. .otf, .ttf, .woff) may be a relevant factor. In that case, if the font is publicly available, maybe share a link to its download page so others can try it out?

  5. You can get a human-readable version of the current WebGL renderer name (i.e. the graphics card/adapter) by typing this into the console, like you did previously for the message window width/height:

    gl.getParameter(gl.getExtension('WEBGL_debug_renderer_info').UNMASKED_RENDERER_WEBGL)
    Knowing this may help to identify your system's rendering limits. Alternatively you can run dxdiag.exe to see a summary of system resources, including the name(s) of the available display/render device(s) as well as CPU speed, total RAM, etc. Laptops in particular may have an integrated chipset for basic display and a dedicated GPU for intensive/3D rendering; RM games are quite undemanding so they'll generally use the integrated graphics in that case unless told to do otherwise.

    Related: if you check the Task Manager in-game, how much RAM is free? If your current game uses a lot of memory, e.g. lots of big parallaxes, and your adapter doesn't have enough on-board VRAM for it all, it may be relying on system RAM. Not sure how that might cause this kind of problem, I just thought I'd ask.
Thank you for your suggestions and the little plugin @caethyril

Unfortunately it doesn't seem to improve the situation, I got a similar glitch still.

g9.png



Have you restarted your system since you started seeing the problem?

I have done that.

You can change the Font Size on the System 2 tab in the database; if you change it to, for example, 1 pt higher or lower, does that affect the problem? Some HTML Canvas text rendering glitches may only occur at certain scales.

It doesn't change it for the dialogues. I suppose a Visustella plugin must bypass System 2?
Anyway if I put, say a very big number, it affects the title screen, menu etc but not the dialogue box.

Does the problem stop if you turn off all plugins, save your project, and test from a New Game? If so, that suggests the plugins you're using are necessary for the problem to occur. E.g. plugins can override the text-drawing methods in the core scripts and/or change available rendering properties of the game's HTML.

Yep it goes away if I remove all the plugins. The problem is also "new". I've been on the same game for weeks and it suddenly appeared. I don't have plugins from many different sources though, it's only Visustella + Community Lighting.

I assume you've changed the font via the Main Font Filename setting on the System 2 tab of the database. If you swap out the font for another one, does the problem disappear? If so, the font file or its format (e.g. .otf, .ttf, .woff) may be a relevant factor. In that case, if the font is publicly available, maybe share a link to its download page so others can try it out?

I tried for a while and things seem to be alright with the default font.
However I made a full game and tested 80% of another one with that specific font (which is a *.ttf) so I wonder what changed. I like this font very much and would prefer avoid having to drop it.

gl.getParameter(gl.getExtension('WEBGL_debug_renderer_info').UNMASKED_RENDERER_WEBGL)

"ANGLE (Intel(R) UHD Graphics Direct3D11 vs_5_0 ps_5_0)"

Knowing this may help to identify your system's rendering limits. Alternatively you can run dxdiag.exe to see a summary of system resources, including the name(s) of the available display/render device(s) as well as CPU speed, total RAM, etc. Laptops in particular may have an integrated chipset for basic display and a dedicated GPU for intensive/3D rendering; RM games are quite undemanding so they'll generally use the integrated graphics in that case unless told to do otherwise.

Related: if you check the Task Manager in-game, how much RAM is free? If your current game uses a lot of memory, e.g. lots of big parallaxes, and your adapter doesn't have enough on-board VRAM for it all, it may be relying on system RAM. Not sure how that might cause this kind of problem, I just thought I'd ask.

RAM seems fine, also it's the most powerful computer I've ever had lol
But regardless of the nature of the computer, it wasn't doing this glitch before. I guess it could still be something that changed from the computer not the game, but I would need a second computer to test this.


Another example just now when it decided to mess up with the t's, but not all :dizzy:

g10.png
Hi there!
So the problem is not in the message window size...
That leaves to a previous point, as I said before:
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.
And also Caethril:
Does the problem stop if you turn off all plugins, save your project, and test from a New Game? If so, that suggests the plugins you're using are necessary for the problem to occur. E.g. plugins can override the text-drawing methods in the core scripts and/or change available rendering properties of the game's HTML.
And you already have stated that the problem does not happen on a clean project:
Yep it goes away if I remove all the plugins. The problem is also "new". I've been on the same game for weeks and it suddenly appeared. I don't have plugins from many different sources though, it's only Visustella + Community Lighting.

So you need to find the plugin that is doing that. You also said:
What changed between now and a month ago, when things were still working properly: some visustella updates, and a core version update (1.3.3 to 1.4.3).
So, if the error does not happen on a clean project, the problem is not on the core files.
It is on the plugins you updated, in that case, Visu ones(if they are really the only ones who got an update).

So you can disable all your plugins, and save the project.
Test your game, if the error does not appear, you enable another plugin.
Save and test the game. If the error still doesn't appear, keep repeating the process until the error appear. Then you will find the plugin that is causing it.

If it was indeed a visu one, make a sample project replicating the problem and send it to them reporting the problem.
Maybe I'll wait for future updates and see if it goes away.
I mean, between core and visustella updates, things change every week, and what is true week n might no longer be true week n+1, so I could locate the issue now, and then it re-appears or something else appears in one week or two. At this point I'll just try to complete the game testing first, and see if the error persists by the time I'm finished.
Updates basically all the time makes it really tough to keep up with everything. It's not the first time I have things that work, and then stop working because something got updated in between :headshake:
And when you have a lot of plugins and a glitch that appears kinda randomly, it's really hard to remove them one by one to try and see if the (random) glitch persists, especially when like in this case, it seems it might be an association of plugins that creates the issue.
Maybe I'll wait for future updates and see if it goes away.
I mean, between core and visustella updates, things change every week, and what is true week n might no longer be true week n+1, so I could locate the issue now, and then it re-appears or something else appears in one week or two. At this point I'll just try to complete the game testing first, and see if the error persists by the time I'm finished.
Updates basically all the time makes it really tough to keep up with everything. It's not the first time I have things that work, and then stop working because something got updated in between :headshake:
And when you have a lot of plugins and a glitch that appears kinda randomly, it's really hard to remove them one by one to try and see if the (random) glitch persists, especially when like in this case, it seems it might be an association of plugins that creates the issue.
I understand, this process of removing plugins and adding one by one is a pain...
If the plugin was not obfuscated, I could take a look at the code to see where it messes with the texts and try to find a solution.
So yeah, if you don't have to hurry to fix it, maybe you can wait for other updates, and luckily it can be fixed.

Good luck then! ^^
So yeah, if you don't have to hurry to fix it, maybe you can wait for other updates, and luckily it can be fixed.

It's definitely NOT crashing the game, sooo 😛
did you try to change fonts to see if it persist the issue?
I did get it with another *.ttf.

g11.png


which btw is not about darkening the font this time.

If anyone's got any clue what's going on, I'd be grateful.
It definitely looks like removing Community Lighting helps and maybe even fixes the situation.
However I've used Visustella and Community Lighting together in a previous (full) MZ game and never had any problem. I also used VS and CL together in the current game I'm testing and never had any problem until recently. So I wonder what changed.
in case community lightning is the culprit to get teh glitch, maybe
they know whats going in and add a patch to it.

otherwise I have no clue as I dont use MZ or own it, so it would be
hard to check.

it is also painfull if visustella obfuscate the code if you cannot make
any patches or edit the code to your own needs if something needs
to be different.

but good luck on your projects, and who knows who have a fix/patch
of the font glitch you have =).
@Indinera - ah, I was wondering if it was just a problem with the second pass, but if removing the outline doesn't help then I guess that's not it. 😴

Are all your plugins up-to-date? For example, it seems Community Lighting was updated on Github 9 days ago:

If you haven't already: try loading Community Lighting before VisuStella (or vice versa) to see if that makes a difference. Remember to save your project before testing.

(If it disappears when Community Lighting is deactivated, I wonder if it's related to the way that plugin uses globalCompositeOperation.)
If you haven't already: try loading Community Lighting before VisuStella (or vice versa) to see if that makes a difference. Remember to save your project before testing.

I did try this.
I have v4.3 and they have a v4.6 so I'm going to try this.
The other plugins (mostly Visustella) are up to date.

EDIT:
@caethyril Nope, 4.6 doesn't fix it.
Updates basically all the time makes it really tough to keep up with everything. It's not the first time I have things that work, and then stop working because something got updated in between
This is a more basic computer use kind of issue...and while there are certainly different mindsets about it, I personally suggest not updating unless it serves a purpose.

If something fixes a problem you've been having, or adds a feature you'd like, then update it. But if everything you have is working fine, you may well not want to update just because a new version is available (and not make use of automatic updating things).

This mindset is based on my decades of computer use and the number of times updating something has caused new problems.

You'll see many larger-scale software projects have two tiers of updating available, the brand new releases and then a later release for the majority of users once those versions have been tested.

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