Text not vertically align even when it's the right font size

i am using Silver by Poppy works for my project and something weird is that even thoght i am using the correct sizes for it, the font isn’t vertically align to the boxes. is something i setted wrong or something more complex?

I don’t think this is something you set wrong. Silver’s glyphs sit high inside their own em box, and there are threads on the font’s itch page from people running into the same offset in GameMaker and Bevy, so it seems to travel with the font rather than being an MZ thing. MZ puts the baseline at Math.round(y + lineHeight / 2 + this.fontSize * 0.35), which assumes the font fills its box the way most fonts do, so a font with its own metrics lands off center.

The simplest thing I’d try is nudging the draw. Save this as a plugin and change the number until it sits right:

const _drawText = Bitmap.prototype.drawText;
Bitmap.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align) {
    _drawText.call(this, text, x, y - 2, maxWidth, lineHeight, align);
};

Worth testing a smaller Font Size too. The default line height is 36, so at Font Size 36 the text is as tall as the line box itself and there’s nothing left to absorb the offset. There’s also a plugin called OpenType Pixel Font Renderer (MV & MZ) that snaps pixel fonts to the pixel grid and corrects the baseline, which sounds aimed at exactly this if the manual nudge gets fiddly.

i attempted OpenType and still happening, i set something wrong?

The Font Family Name field is asking which family MZ is already drawing with, not the name of your font. In MZ that’s rmmz-mainfont for most text and rmmz-numberfont for the gauge numbers, so with Silver typed in there I think the plugin isn’t catching anything to replace. Leave Silver.woff in the file name field and swap the family over to rmmz-mainfont, then add a second entry for rmmz-numberfont if you want the numbers to match.

Base Size is the size the font actually renders at, not the number you have in the database. Going by the threads on Silver’s own itch page the native size is 19, so 38 is the clean 2x. The plugin works off the gap between that and your Font Size to shift the baseline, so having 36 in both spots is telling it there’s nothing to correct.

Might be worth trying Font Size 38 as well while you’re in there, since a multiple of 19 puts the glyphs on whole pixels.

still… weird… i did everything right…

Let’s try something different. Turn off the plugin so only one thing is touching the text, then save this as its own plugin file in js/plugins/ and enable it in the Plugin Manager:

/*:
 * @target MZ
 * @plugindesc Nudges drawn text up or down.
 */
(() => {
    const _drawText = Bitmap.prototype.drawText;
    Bitmap.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align) {
        _drawText.call(this, text, x, y - 2, maxWidth, lineHeight, align);
    };
})();

Change the - 2 to - 4, - 6, + 2, whatever, and playtest after each one. The text should move every time you change that number, so you can just stop when it sits where you want it.

If it doesn’t move at all, let me know and we’ll look somewhere else.

here seems central? i changed to - 5

Looks centered to me. Worth glancing at a message box and a battle screen before you settle on 5 though, since that nudge hits every string the game draws, not just the menu.

Glad it worked out!