Sharp Text [MZ + MV]

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!

Not the right place to ask this but anyway:
1656301277881.png
This plugin helped me immensely with getting my text to be perfectly crisp on Windows.

Unfortunately, it turns out it causes some issues on Mac due to how the render text differently so I had to make a small tweak:
if (navigator.platform.startsWith(`Mac`)){ var TextSharp_LineWeight = 1.83 - parseFloat(params['textThickness']); } else { var TextSharp_LineWeight = 1.0 - parseFloat(params['textThickness']); }

LineWeight is significantly different on Mac, so I've had to manually adjust it based on if the user is on Mac or not. Hope this is helpful to anyone else facing this issue.
@ZServ as a curiousity, what does window.devicePixelRatio return?
@ZServ as a curiousity, what does window.devicePixelRatio return?
Returns 1 on Windows, 2 on Mac.

There is a system wide config setting that can be changed, but due to it being extremely hidden my research has shown that most HTML5 devs just try to get it "close enough" through CSS hacks. If this is something that piques your interest in poking at for a more for-realsies type of fix, feel free to DM me and I can give you my Discord info and be a live test subject. This value was extremely tuned for this font and the specific conditions of my projects, so it wasn't meant to be a "one-size fits all" type of fix.
I might try

Code:
var pixelRatio = window.devicePixelRatio || 1;
var TextSharp_LineWeight = pixelRatio - parseFloat(params['textThickness']);
@MechPen I don't know if you add feature requests but maybe different parameters based on font size?
Yeah, as Archeia has sort of hinted at here, the pixel ratio will need adjusted on a font-by-font basis. While the text thickness ratio has worked fine for Windows builds across multiple fonts, the pixel ratio has not. A secondary parameter would suit my purposes just fine, but to be quite honest I don't believe most users will be actively making an effort to have equal compatibility for their titles between multiple platforms (due to the prohibitive cost of having access to these platforms).

Power users are the exception, of course.

Edit: Yeah, making that change did not result in an equivalent result-- though this makes sense. I had tuned it to 1.83 on Mac, versus it being 1.5 on Windows. By being adding that above snippet, the math would now look like:

((1 + 1) - 0.5) = 1.5 -- Windows
((1 + 2) - 0.5 = 2.5 -- Mac

Going above 1.33 on the particular font I'm using will cause it to simply not render, and as the thickness changes on a per-platform basis the concept of a second parameter to serve as a per-platform modifier seems like solid idea (granted, I'm not sure you would structure that except a bunch of switch cases).

To be clear here, I don't view this as your problem! You've delivered an amazing solution here-- so please don't interpret this as me "fix begging" 🙂
I think when I posted that screenshot way back, now that I'm looking at things once more, I find that you may want to update this plugin for the text that gets drawn as a sprite such as the text for the HP/MP/TP gauges and whatnot.

Basically you'll want to look through rmmz_sprites.js to find the text that's missing.
Hi! I've tried out the plugin and while it does look great, I've run into something a bit odd.
The outline is inconsistent, in menu's mostly.

On the main menu "options" is thinner, and here half of the options are thinner.
I am using YEP Core Engine and Message Core.
If I turn off the outline in 1 plugin, its still there on the other and vice versa.

1694261368992.png
This is tough to fix as RPG Maker MV will happily draw text at fractions of pixels (this is what happens when you center text; if its an odd width it gets draw at center + 0.5 and the half pixel offset causes blurriness or distorts the shape. MZ handles this a bit better.

What does it look like without any YEP Cores? I am aware they change a lot of the core functionality of RPG Maker.
If I turn all the Core plugins off it looks like this:
1694643451972.png

It's a bit better, but not nearly as nice looking, especially with the size of the font being too big for most of my dialouge boxes
Thanks for responding ^^, hoping there's something we can do to make it look nicer
Is there a script like this for VX Ace?
This plugin was only designed to fix an issue with how HTML5 canvas elements render text. If fonts are blurry in VX Ace then that must be a renderer issue and someone more familiar with RGSS should look into it.
The visustella message core seems to break this plugin specifically for the message window, which is frustrating.

It's odd cause all other plugin in the series seem to work fine with it.

I'm trying to trial & error my way into figuring out what breaks it but to no avail so far.

EDIT: Never mind, it was some specific setting that broke it. Works good on default settings. Problem solved.
Hi! I have an error similar to @/PhilRay, the font I'm using becomes bold with the plugin on.
I'm using MV, so I tried to fix it with the mini plugin you recommended to add, but it just made the font's thickness irregular on the starting screen.
The plugins I have on are Community_Basic, Yanfly's Message Core and one that takes out the outline of the text.
For reference, here is some dialogue with Sharp Text on:
PluginOn.png

Without Sharp Text:
PluginOff.png

And how it should look:
IdealLook.png

Thanks in advance 🙂
@Tiralanthir I guess that is what it supposed to look like without semi-transparent pixels. Either you discard the semi-transparent pixel or keep it. Unfortunately, some stroke just squat two pixels and it is hard to decide.

Maybe you can try different font size, find one that fit the pixels better.

By the way, I'm not mean to advertise but the font you are using is very similar to "ms gothic" in my topic.:LZSgrin:
1723181729028.png

I understand that you mean the plugin is making the semitransparent pixels that result of anti-aliasing solid, but I don't really know how to fix that.
I have tried different font sizes (and other pixel fonts), but it always ends up looking "bold".

The font I'm using is pretty similar to ms gothic bc I made it trying to replicate the look of it on RPGM2000/2003 but fixing kerning and spacing issues.
@Tiramisu
Maybe you need to find the correct size that the font display clear single pixel strokes.
For example, if it is 13px, then you need to change the font size to 26.
However, many fonts have decimal kerning and spacing, so they always look bold.

Can you share the font? Because the spacing is a bit off of that ms gothic. But the good thing is, it doesn't have decimal issue. As you can see in my screenshot the font is quite clear.
This plugin look's awesome.
But there is a problem when used with [YEP Party system] plugin.

When I open a party change window during a battle and go back to the battle screen
and open skill window, game becomes super laggy.
I think game is getting heavy because of sharpening text but I have no clue how to fix this.

I'm using MV.
Does anyone know a solution for this?
@Tiramisu Likely this is impossible to fix in RPG Maker MV, as it draws each letter individually and will happily draw the next letter at a fractional offset. MZ draws a chunk of text until it reaches a control code so this issue is better hidden. Some fonts will behave better than others. In my own project I used YellowAfterlife's Pixel font converter to avoid many of the spacing issues. Remember that TTF is a vector format descibing lines, so its never going to represent pixel fonts 100% accurately.

@lsjadsl Do you use any other battle plug ins? Likely there is a bug somewhere that is causing a window to be redrawn every frame. It may be worth it to upgrade your nw.js to something newer if you have not yet. This plug in works by editing each individual pixel of the text and erasing parts that are "blurry" so its never going to be particularly fast.

You both may have more luck with Eli's old Eli_BitmapFontPro from his MV archive.

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