Sharp Text [MZ + MV]

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.
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:
@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.
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.
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.
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)
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.
SyntaxError
Unexpected token '{'
Been getting this.
@BloodletterQ whoops sorry about that! I'd misplaced a parenthesis. The file has been updated. Try using the new version.
You are amazing! Works like a charm. Wouldn't know I wasn’t using a Bitmap Font.
@BloodletterQ whoops sorry about that! I'd misplaced a parenthesis. The file has been updated. Try using the new version.
I used it here, thanks very much for the awesome plugin :3c
Hey that looks great! Congrats. I should think about moving this to JS Plugin Releases now that its been battle tested.
Could this be combined with other font plugins like Eli's Font Manager?
Probably! the plug only changes the drawing pixels part. the thickness setting might not look so good with multiple fonts.
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);"
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.
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?
@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;}
    }
No, thats didnt work.
It just moved the text to the left.
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!

Original thread: https://forums.rpgmakerweb.com/threads/sharp-text-mz-mv.132598/