Sharp Text [MZ + MV]

utunnels was able to solve this with a plugin utilizing opentype.js Go and use that one. The Sharp Text plugin will still be maintained for people who are using it but I highly recommend OpenType Pixel Font Renderer instead.

Sharp Text v0.94 beta
MechPen
​

Introduction
I'm working on a bleep-bloop retro style game, and was annoyed at how blurry the text looked. Any size, any resolution, any CSS options; the UI Text just looked sad. It's not really an engine flaw either; just a symptom of how HTML5 canvas renders text. This attempts to fix that, mostly though the magic of ImageData.

Features
Removes the Anti-aliasing on all text in the game.

Screenshots
rpg_text_smooth_vs_sharp.png

How to Use
Simply install to your plugins folder and turn it on in the Plugin Manager. This plugin should almost certainly go at the top of the list; we are changing how the base engine performs a DrawText function.

This is a beta so things might lag, look terrible, or generally not work! To improve visuals it may be necessary to change the Font Size up or down slightly from the System 2 tab, Advanced Settings block.

Development
Please use this thread to notify me of any issues, or to make a feature request.

It's now (more) compatible with MV! It seems to misbehave at smaller text sizes though.

There are now options to adjust how many pixels are trimmed off the text (something like font thickness) as well as an option to leave the text outline as standard.

Centering text will now attempt to draw on the nearest pixel, to make the text as sharp as possible.

Download
Github


License

This plugin is released under the MIT License.
O, man, this plugin is a life savior! I've wasted hours of my life trying to make SFonts work with other plugins.
Thanks!
Thanks, it works well for what I need to (pixel font at a set size). Do let me know if something doesn't behave quite right. I noticed a small issue with damage pops but I'm not sure if its just my font or how this plugin renders them.
There's a problem with your plugin.
I thought it was going to work, but there's an error.
Screenshot (573).png


CGMV_Gameinfo: https://forums.rpgmakerweb.com/index.php?threads/cgmv-game-info.91628/
SRD_TitleMapBackground: http://sumrndm.site/title-map-background/
SRD_PressStart: http://sumrndm.site/press-start/

These I used MV, I hope if you can fix it, please.
eRPoS7yw.jpeg

That image they make 2 buttons (No layer Plugin - All 3 Plugins, 2 Layers).
And the first one is the original RMMV.
The second one is really better, but no one can figure it out, so I hope if you can make one in the second.
What font is that? I'll see if I can figure this out.
What font is that? I'll see if I can figure this out.
It can be any pixel font.
Thank you for the great script! After a lot of playing around I managed to get my pixel font to work properly.

1613562913550.png


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:
1613565312415.png
Bitmap.prototype._drawTextOutline = function() return; };
Do I have to add a plugin?
Do I have to add a plugin?
make a js file and plop that in.
Nothing change, blur font didn't remove.
2021_2_17_21_20_46_789_4578.png
Nothing change, blur font didn't remove.
View attachment 179791

I wouldn't know man you clearly see in my screenshot it works.
Which pixel font did you use? I might download the same font in your screenshot.
Both that, and the 'bolding' of the Window Category text are the same issue. It seems to misbehave whenever text is 'centered'. And it works better in MZ than in MV. I'll see if I can revise.
var scaleWithSize = (TextSharp_LineWeight + (TextSharp_LineWeight * 24 / this.fontSize)) / 2;
is part of the lineweight algorithm so if it's not adjusting with font size let me know and I'll see if I can come up with a better equation.
Both that, and the 'bolding' of the Window Category text are the same issue. It seems to misbehave whenever text is 'centered'. And it works better in MZ than in MV. I'll see if I can revise.
var scaleWithSize = (TextSharp_LineWeight + (TextSharp_LineWeight * 24 / this.fontSize)) / 2;
is part of the lineweight algorithm so if it's not adjusting with font size let me know and I'll see if I can come up with a better equation.

Font size wise it seems to be doing pretty OK so far. I'll test more 🙂
2021-02-18_11-29-58.png
Oh, THANK YOU THANK YOU THANK YOU. Been trying to figure out for months and I had fallen into dispair.
Am I the only one who's having compatibility problems with name boxes? :X
MV with Yanfy plugins
Sprite-0001.png
If Yanfly doesn't respect the pixel grid (or outlines) then you'll have to edit the name box plugin to get it to behave. Search for `drawText` and maybe edit the numbers?
You are amazing.

My font is now pixel perfect, however, it seems to be bold (see attached image), and nothing I put in "text thickness" has any effect.

Any idea what I'm doing wrong?

Thank you in advance!
Heya

This plugin is awesome. My text is now sharp, however I can't get rid of the outline on dialogue text.
Spoiler: Outline on text
outline.png

There's no outline on the title screen menu text
Spoiler: No outline on text
no outline.png


However there is an outline in the in game menu.

Is there a way currently to remove the outline? Just want the flat text like on the title screen menu, no outline or shadow. Or is it a feature that could be added to the plugin?

I am using RPG Maker MV. Plugins that might be related: Yanfly core engine, message core and Galv's message styles. Have tried various settings in those plugins including setting Font Outline to 0 in YEP Message Core, but still the outline on most text.

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