MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
88
Reaction score
88
First Language
English
Primarily Uses
RMMV
Which HUDMaker? MV? MV will happily draw letters on a fraction of a pixel and mess up my carefully laid pixels, which is why I've stopped working on this plugin.

Try entering your outline color as rgba(0, 0, 0, 0.5) and your textColor as hex #RRBBGGAA. Otherwise the code that gets the colors from the text objects might need to change. It would be possible to draw the color to a 1x1 pixel image and then read the resulting color. this would work no matter the color format but would likely be even slower than it is now.
 
Last edited:

Archeia

Level 99 Demi-fiend
Staff member
Developer
Joined
Mar 1, 2012
Messages
15,659
Reaction score
16,348
First Language
Filipino
Primarily Uses
RMMZ
Hi MechPen,

There's a bug with RGBA color outline with this font.
It should be:
JavaScript:
        var r = parseInt(rgb[0]);
        var g = parseInt(rgb[1]);
        var b = parseInt(rgb[2]);
        var a = parseFloat(rgb[3])*255;

It was turning my outline color to green instead of purple so I noticed it!
There's also this strange bug:
1648926253760.png
This is the font I'm using at size 24:
 
Last edited:

MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
88
Reaction score
88
First Language
English
Primarily Uses
RMMV
@Archeia thanks for the fix! I've only ever used a grey outline so I never noticed.

Can you use the javascript console to check if that window is being drawn at a fractional pixel? otherwise perhaps the font is using ligatures to make the it combo look nicer and their off the pixel grid. I'll try and check the font.

Are you sure this is the font you are using? this one is serif and the one in the screenshot is sans-serif.
 
Last edited:

Archeia

Level 99 Demi-fiend
Staff member
Developer
Joined
Mar 1, 2012
Messages
15,659
Reaction score
16,348
First Language
Filipino
Primarily Uses
RMMZ
Hey @MechPen that should be the one but just in case, you an also try this:

Both do the same "bug" and I'm using 0.28 thickness just in case! I didn't really like how thick 0.48 was and was trying to get as thin as possible. If you need the plugin to display the text, here is the plugin. https://www.dropbox.com/s/dh5d9dvlj2t1qct/VisuMZ_0_CoreEngine.js?dl=0

If you need a sample project let me know. I can prepare something probably.
 

MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
88
Reaction score
88
First Language
English
Primarily Uses
RMMV
I wonder if there's some weirdness with this font, or if I've just done some math wrong somewhere. Tonbi has a plugin that does what this one does now and it works a little differently.

You can get an english translated copy from this link

If I use TF_SharpFont.js and the settings Basic Font Size 12, Basic font threshold 189, All sharpness true, Font threshold 200, Sharpness 50 with your font then things look a little better. So maybe the best way forward for you is to just do that.
 

Archeia

Level 99 Demi-fiend
Staff member
Developer
Joined
Mar 1, 2012
Messages
15,659
Reaction score
16,348
First Language
Filipino
Primarily Uses
RMMZ
I wonder if there's some weirdness with this font, or if I've just done some math wrong somewhere. Tonbi has a plugin that does what this one does now and it works a little differently.

You can get an english translated copy from this link

If I use TF_SharpFont.js and the settings Basic Font Size 12, Basic font threshold 189, All sharpness true, Font threshold 200, Sharpness 50 with your font then things look a little better. So maybe the best way forward for you is to just do that.
Maybe it's because it has japanese glyphs? tho unsure why that would be a problem.
I'll try Tonbi's! But I like your work so I've been trying with it u_u)
 

MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
88
Reaction score
88
First Language
English
Primarily Uses
RMMV
I opened JF-Dot-MPlusH-12 in FontForge (yes I am that particular about fonts, that how this plugin got made) and it looks like this font is set to Scale Outlines. so when we double the size I bet we are getting some overflow that way. mapping a vector font to a pixel grid is not easy. The EM size is also 1024 instead of 1000 so that doesn't scale as nice either.

Maybe instead we need a plug in that draws fonts small so they are on the pixel grid like intended and then nearest doubles or triples them...

I usually use Yellow Afterlife's pixel font tool to generate glyphs because it does everything right but if you need to support a lot of characters then that's not feasible. I'll see if I can come up with anything.
 

MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
88
Reaction score
88
First Language
English
Primarily Uses
RMMV
@BloodletterQ whoops sorry about that! I'd misplaced a parenthesis. The file has been updated. Try using the new version.
 

BloodletterQ

Chaotic Neutral Assassin
Veteran
Joined
Aug 15, 2012
Messages
1,596
Reaction score
1,228
First Language
English
Primarily Uses
N/A
You are amazing! Works like a charm. Wouldn't know I wasn’t using a Bitmap Font.
 
Last edited:

Archeia

Level 99 Demi-fiend
Staff member
Developer
Joined
Mar 1, 2012
Messages
15,659
Reaction score
16,348
First Language
Filipino
Primarily Uses
RMMZ

MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
88
Reaction score
88
First Language
English
Primarily Uses
RMMV
Hey that looks great! Congrats. I should think about moving this to JS Plugin Releases now that its been battle tested.
 

pennylessz

Veteran
Veteran
Joined
Apr 25, 2022
Messages
56
Reaction score
14
First Language
English
Primarily Uses
RMMZ
Could this be combined with other font plugins like Eli's Font Manager?
 

MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
88
Reaction score
88
First Language
English
Primarily Uses
RMMV
Probably! the plug only changes the drawing pixels part. the thickness setting might not look so good with multiple fonts.
 

BloodletterQ

Chaotic Neutral Assassin
Veteran
Joined
Aug 15, 2012
Messages
1,596
Reaction score
1,228
First Language
English
Primarily Uses
N/A
Sanguine 5_18_2022 10_27_33 AM.png
I think you forgot to set it up to work for Actor_BattleStatus.

Also a suggestion, wondering if you could add a feature to increase the size of the outline?

UPDATE: I figured it out myself! It wasn't in your plugin in particular, so I wouldn't worry about it. If this happens in anybody else's games, just make sure to use "this.drawActorName(actor, nameX, nameY);" as opposed to this.placeActorName(actor, nameX, nameY);"
 
Last edited:

MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
88
Reaction score
88
First Language
English
Primarily Uses
RMMV
it's true; attempting to center text in a window with an odd width (as opposed to an even width) will have the engine draw it at x.5 pixels and ruin all my hard work.
 

Lornsteyn

Sleepy Dragon
Veteran
Joined
Nov 15, 2013
Messages
399
Reaction score
503
First Language
German
Primarily Uses
RMMZ
Wow, why do I see this now?
Very helpful plugin, but it doesnt seem to affect the choice text window, any way to fix this too?
 

MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
88
Reaction score
88
First Language
English
Primarily Uses
RMMV
@Lornsteyn this plugin replaces Bitmap.prototype.drawText and so should work for every window in the game. Sometimes things get a little weird when drawing centered text but I attempted to fix it.

can you try searching for, and deleting the following code from the plugin and see if that helps? it should be in two places


JavaScript:
    if (align === "center") {
        tx += Math.round(maxWidth / 2);
        var wobbly = this.measureTextWidth(text);
        if ((wobbly % 2) == 1) { tx -= 0.5;}
    }
 

Lornsteyn

Sleepy Dragon
Veteran
Joined
Nov 15, 2013
Messages
399
Reaction score
503
First Language
German
Primarily Uses
RMMZ
No, thats didnt work.
It just moved the text to the left.
 

zodismegalame

Warper
Member
Joined
May 28, 2022
Messages
1
Reaction score
0
First Language
English/Spanish
Primarily Uses
RMMZ
Thank you for the great script! After a lot of playing around I managed to get my pixel font to work properly.

View attachment 179712

I personally disabled text outline and went with shadows (I'm using Visustella Core before anyone asks). But you can turn it off by doing a quick snippet like this:
JavaScript:
Bitmap.prototype._drawTextOutline = function()
  return;
};

Afterwards I just adjusted the line thickness based on the font (not all of them works the same). In my case, it's 0.29. The only downside is once you start adjusting font sizes. It'd be nice to have the ability to add custom thickness based on font size but that's just me throwing some wishes.

@MechPen I did find a bug that for some reason it would bold the Window Category Text:
View attachment 179716
hey, I'm super new to RPG Maker and I was wondering how you did the shadow? I know you mentioned Visustella Core but I don't know how to use it, and I can't disable the debug features. thanks in advance!
 

Latest Threads

Latest Profile Posts

the girls.png
So, these are all the girls of the party =3 (beside the protagonist if you play as a female.)
Now, I just have one more character sheet of the guys left and I'm done with their presentations =3
Can you recognize where this area is from? :kaocry:
Mq9QM3h.png
For those with up to 9 elements of magic; how do you structure your database. By element? Or by what is offensive vs supportive spells?
would anyone here be interested in rough concept art for the main protagonist of my game that might get changed later? :kaoswt2:
I guess I have no idea how to properly upload a custom font lmao. The menu fonts are too damn small.

Font_Size.PNG

Forum statistics

Threads
124,439
Messages
1,163,664
Members
163,255
Latest member
Gamechanger
Top