RMMV [MAYBE SOLVED] SFonts not loading first few letters when using colour code

CiaranPixelz

Villager
Member
Joined
Jun 22, 2018
Messages
7
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hey everyone, I've been facing some weird issues when using the SFonts plugin for RPG Maker MV. I've been using in conjunction with several other plugins but I've tried disabling them (including Yanfly's plugins) and the issue seems to persist.

The issue, is that when using color codes with the SFonts, a lot of the time, it won't load the first few letters and just replace where the letters would be with a blank space, I've found that if I use the color code beforehand, the next message will load correctly, so I'm inclined to believe there's some sort of loading issue? (I'm not an expert at ALL.) Regardless, I found this post from @Oscar92player posted a couple years ago that seems to share some similarities with my issue, but the fix no longer works since the fix was for 1.5.0 so I have no way of actually knowing if it had worked.

If anyone knows what the issue might be, and how to fix it, please let me know. It's been bothering me for several months now and I have to be using SFonts.
(This is also my first time using the forums, so I apologise If I have made some errors with this post)
Screenshot 2022-01-18 113543.jpg
 

KurayamiBlackheart

Phoenix of darkness.
Veteran
Joined
Sep 4, 2019
Messages
173
Reaction score
137
First Language
French
Primarily Uses
RMMV
Hey everyone, I've been facing some weird issues when using the SFonts plugin for RPG Maker MV. I've been using in conjunction with several other plugins but I've tried disabling them (including Yanfly's plugins) and the issue seems to persist.

The issue, is that when using color codes with the SFonts, a lot of the time, it won't load the first few letters and just replace where the letters would be with a blank space, I've found that if I use the color code beforehand, the next message will load correctly, so I'm inclined to believe there's some sort of loading issue? (I'm not an expert at ALL.) Regardless, I found this post from @Oscar92player posted a couple years ago that seems to share some similarities with my issue, but the fix no longer works since the fix was for 1.5.0 so I have no way of actually knowing if it had worked.

If anyone knows what the issue might be, and how to fix it, please let me know. It's been bothering me for several months now and I have to be using SFonts.
(This is also my first time using the forums, so I apologise If I have made some errors with this post)
if you're allowed to share the plugin, share it so that I (or someone else) can look into it.

I'm fairly certain the plugin's replacement method is poorly made, thus making it not show the message properly. (if you indeed are positive about the fact it can't be a plugin incompatibility). the problem is probably a regex replacement method that hasn't been programmed correctly.

I'll gladly look into the code of the plugin to see what is exactly wrong and help you fix it, but be sure that the author allow you to share it.

EDIT : Oh it's Victor Engine, why am I not surprised xD I already had to fix a memory leak from one of his plugin, and 2 errors. could you show me the code you're using in your message box (for the message that didn't render properly) ?
 

CiaranPixelz

Villager
Member
Joined
Jun 22, 2018
Messages
7
Reaction score
2
First Language
English
Primarily Uses
RMMV
if you're allowed to share the plugin, share it so that I (or someone else) can look into it.

I'm fairly certain the plugin's replacement method is poorly made, thus making it not show the message properly. (if you indeed are positive about the fact it can't be a plugin incompatibility). the problem is probably a regex replacement method that hasn't been programmed correctly.

I'll gladly look into the code of the plugin to see what is exactly wrong and help you fix it, but be sure that the author allow you to share it.

EDIT : Oh it's Victor Engine, why am I not surprised xD I already had to fix a memory leak from one of his plugin, and 2 errors. could you show me the code you're using in your message box (for the message that didn't render properly) ?
Yeah, sure. so in the screenshot, the code I was using was pretty simple, just a simple colour change.
\c[4]This is the issue.
The first few letters did not render.
if you don't know, how the plugin works is for the different colours it loads in a different specified file, so in this case it loaded in the image file for the green font. I've noticed if I speed the game up using SRD's super engine, even more characters and letters disappear like 7, rather than the 1 that disappeared in this case.

Here's the download page for the sfonts plugin.

And, I once again can confirm it is not a compatibility issue since I just tried disabling ALL plugins in the project except for the sfont and the issue persists.
 
Last edited:

KurayamiBlackheart

Phoenix of darkness.
Veteran
Joined
Sep 4, 2019
Messages
173
Reaction score
137
First Language
French
Primarily Uses
RMMV
Yeah, sure. so in the screenshot, the code I was using was pretty simple, just a simple colour change.

if you don't know, how the plugin works is for the different colours it loads in a different specified file, so in this case it loaded in the image file for the green font. I've noticed if I speed the game up using SRD's super engine, even more characters and letters disappear like 7, rather than the 1 that disappeared in this case.

Here's the download page for the sfonts plugin.

And, I once again can confirm it is not a compatibility issue since I just tried disabling ALL plugins in the project except for the sfont and the issue persists.
I already found the plugin, downloaded it and tried to run the same code than yours with the sample fonts Victor Engine proposed, I couldn't reproduce your issue no matter how hard I tried.
I tried to "break" it for it to happen, no dice.

Also I did understand that it loads the fonts as bitmap, and separate them for each letters, then use the letters to know the coordinates.

We need to be able to reproduce your issue ! :kaoswt2: could you try disabling every plugin just to be sure ? Is the plugin updated (if it even got an update since the last time you downloaded it) ?

Because on my side, the plugin works perfectly.

EDIT : Does it happen only the first few messages when the game starts ?
Did you try starting a new game and see if it happens ?
Does it happen only for a specific custom font ?
Do you have a space inside the filename of your custom font ? (or any character that isn't recommended)

If you can reproduce the issue in a consistent way, don't hesitate to tell me the step to make it happens. Or even to send me a sample project, so that I can look into it ! :kaohi:
 
Last edited:

CiaranPixelz

Villager
Member
Joined
Jun 22, 2018
Messages
7
Reaction score
2
First Language
English
Primarily Uses
RMMV
I've made sure the plugin is updated at v1.05, as well as I disabled all of the other plugins while testing it. Perhaps the issue is with the image file itself? although that wouldn't make much sense. Even on my end, the issue is very inconsistent, I'll try using the default Sfonts that come with the plugin to see if it makes a difference.

UPDATE: Even when using the SFonts that come with the plugin, the issue persists, though I've found the placement of the event determines whether this glitch occurs. If I place it in another part of the game, the glitch doesn't occur? but in the place it is at, which is right after a map transfer, the glitch occurs. This isn't just a one off either though, since it's an issue that happens all across the game but it's really inconsistent. :/
I already found the plugin, downloaded it and tried to run the same code than yours with the sample fonts Victor Engine proposed, I couldn't reproduce your issue no matter how hard I tried.
I tried to "break" it for it to happen, no dice.

Also I did understand that it loads the fonts as bitmap, and separate them for each letters, then use the letters to know the coordinates.

We need to be able to reproduce your issue ! :kaoswt2: could you try disabling every plugin just to be sure ? Is the plugin updated (if it even got an update since the last time you downloaded it) ?

Because on my side, the plugin works perfectly.
 
Last edited:

KurayamiBlackheart

Phoenix of darkness.
Veteran
Joined
Sep 4, 2019
Messages
173
Reaction score
137
First Language
French
Primarily Uses
RMMV
I've made sure the plugin is updated at v1.05, as well as I disabled all of the other plugins while testing it. Perhaps the issue is with the image file itself? although that wouldn't make much sense. Even on my end, the issue is very inconsistent, I'll try using the default Sfonts that come with the plugin to see if it makes a difference.
Oh I edited my message btw to add more questions/etc.

Lemme know ! It might be the filename. Or maybe you've done some edits on the core plugins of the project itself (rpg_core, rpg_windows, etc etc).
 

CiaranPixelz

Villager
Member
Joined
Jun 22, 2018
Messages
7
Reaction score
2
First Language
English
Primarily Uses
RMMV
Even when using the SFonts that come with the plugin, the issue persists, though I've found the placement of the event determines whether this glitch occurs. If I place it in another part of the game, the glitch doesn't occur? but in the place it is at, which is right after a map transfer, the glitch occurs. This isn't just a one off either though, since it's an issue that happens all across the game but it's really inconsistent.

Oh, and yeah I thought it could be some of the core files, so I quickly switched them with core files from a brand new project, it did not solve the problem.

It only seems to happen to the coloured fonts, most notably whenever there's a map transfer, is when I find the problem happens the most, although sometimes it happens regardless without a map transfer. Also, I've mentioned this but whenever I use SRD's super tools plugin, which allows me to speed up the game, even more letters disappear than usual (usually it's 1 or 2, but with the speed increased, entire words disappear)
Oh I edited my message btw to add more questions/etc.

Lemme know ! It might be the filename. Or maybe you've done some edits on the core plugins of the project itself (rpg_core, rpg_windows, etc etc).
 

KurayamiBlackheart

Phoenix of darkness.
Veteran
Joined
Sep 4, 2019
Messages
173
Reaction score
137
First Language
French
Primarily Uses
RMMV
Even when using the SFonts that come with the plugin, the issue persists, though I've found the placement of the event determines whether this glitch occurs. If I place it in another part of the game, the glitch doesn't occur? but in the place it is at, which is right after a map transfer, the glitch occurs. This isn't just a one off either though, since it's an issue that happens all across the game but it's really inconsistent.

Oh, and yeah I thought it could be some of the core files, so I quickly switched them with core files from a brand new project, it did not solve the problem.

It only seems to happen to the coloured fonts, most notably whenever there's a map transfer, is when I find the problem happens the most, although sometimes it happens regardless without a map transfer. Also, I've mentioned this but whenever I use SRD's super tools plugin, which allows me to speed up the game, even more letters disappear than usual (usually it's 1 or 2, but with the speed increased, entire words disappear)
SFonts seems to load the bitmap each time it has to draw a text (looking at the code). I'll try to reproduce the issue on my side with map transfers.

Also if alot of stuffs disappear when you speed up, it might be due to the plugin not being compatible with SRD's speeding up function. It loads the bitmap then proceed to draw each character one by one from left to right. If alot of characters are missing in-between others characters, it means that the drawing function fail somehow. It doesn't look like a loading issue, since it loads the bitmap before attempting to draw them.

EDIT : anyway you could always try this plugin : http://sumrndm.site/preloader-core/
and put the file in the folder sfonts has a preload, to see if it fix your problem. if it is, then perhaps if the computer is too slow or the game is taking too resources, it has trouble loading it and don't wait for it to be loaded in order to draw from it. but it would be weird, since if it wasn't loaded you would get a crash error telling you bitmap is not defined, or something like this (when it tries to use the bitmap).
 
Last edited:

CiaranPixelz

Villager
Member
Joined
Jun 22, 2018
Messages
7
Reaction score
2
First Language
English
Primarily Uses
RMMV
I'm going to build up the game in a new project until the glitch is replicatable again, then I'll send it, though I've realised something strange, I cut down the event's length from hundreds of things happening to just a few text boxes, and strangely enough, the issue in this instance disappeared? adding the rest of the event back caused the issue to come back.

UPDATE:
This is strange. In the new project, the glitch only occurs if a single plugin isn't there, however in the actual game, the glitch consists even if I get rid of said plugin (which I already knew it wasn't an incompatibility since I removed ALL plugins), even stranger is that if the event is slightly shorter, the glitch doesn't happen, the only thing I can think of from a code perspective is that perhaps it's something to do with the game being low on memory? (I don't know what I'm talking about but, I'm trying to make sense out of this)
SFonts seems to load the bitmap each time it has to draw a text (looking at the code). I'll try to reproduce the issue on my side with map transfers.

Also if alot of stuffs disappear when you speed up, it might be due to the plugin not being compatible with SRD's speeding up function. It loads the bitmap then proceed to draw each character one by one from left to right. If alot of characters are missing in-between others characters, it means that the drawing function fail somehow. It doesn't look like a loading issue, since it loads the bitmap before attempting to draw them.
 

KurayamiBlackheart

Phoenix of darkness.
Veteran
Joined
Sep 4, 2019
Messages
173
Reaction score
137
First Language
French
Primarily Uses
RMMV
I'm going to build up the game in a new project until the glitch is replicatable again, then I'll send it, though I've realised something strange, I cut down the event's length from hundreds of things happening to just a few text boxes, and strangely enough, the issue in this instance disappeared? adding the rest of the event back caused the issue to come back.

UPDATE:
This is strange. In the new project, the glitch only occurs if a single plugin isn't there, however in the actual game, the glitch consists even if I get rid of said plugin (which I already knew it wasn't an incompatibility since I removed ALL plugins), even stranger is that if the event is slightly shorter, the glitch doesn't happen, the only thing I can think of from a code perspective is that perhaps it's something to do with the game being low on memory? (I don't know what I'm talking about but, I'm trying to make sense out of this)
Nope. The game will take as much RAM as it wants, actually if you have a memory leak and if it's not dealt by the garbage collector, or the game just takes too much RAM, it will simply close (crash without saying anything).

It is strange indeed. You could try as I proposed to use SRD Preloader, and add your custom font and its folder as a preload to see if it still happens. If it still happens and you can make a sample project that produces the issue, don't hesitate to send it. I will be way more likely to backtrack this behavior if I can encounter the said issue on my side ! :kaohi:
 

CiaranPixelz

Villager
Member
Joined
Jun 22, 2018
Messages
7
Reaction score
2
First Language
English
Primarily Uses
RMMV
Nope. The game will take as much RAM as it wants, actually if you have a memory leak and if it's not dealt by the garbage collector, or the game just takes too much RAM, it will simply close (crash without saying anything).

It is strange indeed. You could try as I proposed to use SRD Preloader, and add your custom font and its folder as a preload to see if it still happens. If it still happens and you can make a sample project that produces the issue, don't hesitate to send it. I will be way more likely to backtrack this behavior if I can encounter the said issue on my side ! :kaohi:
Yeah, I did try some preloaders, couldn't get any of them to work correctly without some sort of compatibility issue, but I can try them again in a bit.

Huh, I've found something very strange. so I decided to add the Community_Basic plugin (one of the built in ones I believe) and messed with the cache limit by making it bigger to around 100 rather than what's it's set by default at 10, interestingly enough this solved the glitch in this instance (haven't confirmed if this will solve the glitch in every instance) but by setting it to 100, it solves the issue, and setting it back to 10 or any lower number causes the issue again, I'm going to quickly see if this solves the issue in every instance it happens or if this is just some sort of coincidence because this glitch is unlike any other I've faced with RPG Maker
 

KurayamiBlackheart

Phoenix of darkness.
Veteran
Joined
Sep 4, 2019
Messages
173
Reaction score
137
First Language
French
Primarily Uses
RMMV
Yeah, I did try some preloaders, couldn't get any of them to work correctly without some sort of compatibility issue, but I can try them again in a bit.

Huh, I've found something very strange. so I decided to add the Community_Basic plugin (one of the built in ones I believe) and messed with the cache limit by making it bigger to around 100 rather than what's it's set by default at 10, interestingly enough this solved the glitch in this instance (haven't confirmed if this will solve the glitch in every instance) but by setting it to 100, it solves the issue, and setting it back to 10 or any lower number causes the issue again, I'm going to quickly see if this solves the issue in every instance it happens or if this is just some sort of coincidence because this glitch is unlike any other I've faced with RPG Maker
Since you already use stuff from SRD I think its preloader should work just fine as long as you place it correctly in your plugin list order.
be sure to add the folder & file inside the preload parameters of the plugin, else it won't preload it.
 

CiaranPixelz

Villager
Member
Joined
Jun 22, 2018
Messages
7
Reaction score
2
First Language
English
Primarily Uses
RMMV
As things are right now, I believe I've solved the issue with the cache thing I've done. however, with that being said I'm not certain yet so I'm going to give it more time to see if any issues arise.
 

Latest Threads

Latest Posts

Latest Profile Posts

My first serious victim in game hacking - Pawnbarian.
Diana Path 2.png
I love these two design wise lol... The high school principal and the captain of the women's wrestling team. they team up as bosses to save the school's accreditation.
Kanori24 wrote on TheRamenGirl's profile.
I love your profile pic. Definitely one of my favorite scenes from OPM :D
Had a funny feeling about my laptop last night so I moved my project over to desktop via thumbdrive, just experienced my first corrupted project and couldn't be happier about the timing!! *proceeds to copy file onto every thumbdrive in the house*

Forum statistics

Threads
122,074
Messages
1,146,301
Members
160,359
Latest member
TheRagingKing
Top