MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
90
Reaction score
91
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,662
Reaction score
16,358
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
90
Reaction score
91
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,662
Reaction score
16,358
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
90
Reaction score
91
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,662
Reaction score
16,358
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
90
Reaction score
91
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
90
Reaction score
91
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,597
Reaction score
1,230
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,662
Reaction score
16,358
First Language
Filipino
Primarily Uses
RMMZ

MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
90
Reaction score
91
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
90
Reaction score
91
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,597
Reaction score
1,230
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
90
Reaction score
91
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
400
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
90
Reaction score
91
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
400
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 Posts

Latest Profile Posts

By far, the weirdest flex I've ever seen on the internet is "I don't have the attention span to read what you wrote, but I REALLY want the world to know I don't have that attention span!".
Why... the FACK... do I work in customer service?!?!
Excuse me while I go question allllll my life choices.
DamageEvil_6.png added!
index.php

Sometimes I wonder why I still try and recruit others to help with my games. It never works.

Forum statistics

Threads
125,777
Messages
1,173,411
Members
164,930
Latest member
alantangyl
Top