Adjusting line height in text window.

Hello everyone!

I just ran into a little problem.
I'm trying to find a way to adjust the line height in the show text window...
I use Yanfly's core engine and message plugins, but the given option in the core engine does only change the line height on the titlescreen and menues for me. Same goes for the padding.

I would need both line height and padding options for the text window... help? Please~ 😢

Thanks!
- Plue
Window_Message.prototype.lineHeight = function () {
return 40;
}
or whatever number your need.
Padding is

Window_Message.prototype.textPadding = function() {
return 10;
}
Thanks @Poryg

So, it does change the line height (as in make the window higher) but it does not affect the font.
I'm not using the standard one, I did open the script file 'gamefont' in the font folder and replaced that with the one I'm using.
(Name is still GameFont, I just exchanged the file it should load.)
Might this cause problems?

What I tried:
I copied both script pieces into a blank .js file and did load it from the plugin manager, therefore I placed it on the buttom.
Didn't change anything (aside from the actual window size?)

I did use script calls from within the event. Same.
Found the culprit.

The best thing would be to create a new Window_Message function:
Code:
Window_Message.prototype.calcTextHeight = function(textState, all) {
    var lastFontSize = this.contents.fontSize;
    var textHeight = 0;
    var lines = textState.text.slice(textState.index).split('\n');
    var maxLines = all ? lines.length : 1;

    for (var i = 0; i < maxLines; i++) {
        var maxFontSize = this.contents.fontSize;
        var regExp = /\x1b[\{\}]/g;
        for (;;) {
            var array = regExp.exec(lines[i]);
            if (array) {
                if (array[0] === '\x1b{') {
                    this.makeFontBigger();
                }
                if (array[0] === '\x1b}') {
                    this.makeFontSmaller();
                }
                if (maxFontSize < this.contents.fontSize) {
                    maxFontSize = this.contents.fontSize;
                }
            } else {
                break;
            }
        }
        textHeight += maxFontSize + 8;
    }

    this.contents.fontSize = lastFontSize;
    return textHeight + this.textPadding * Math.floor(textHeight / this.lineHeight());
};

And yes, copying into a js file is fully correct.
Sorry I am helping only remotely. Haven't done any playtesting on it, because circumstances.
If I add this into a new js file my font is gone, I just can hear the sound effects from Yanfly plugin but don't see any letters, haha.

Thanks for the help Poryg, but might be that I just have to stick to how it's right now, it's not unbearable, but not as pretty as I'd like to, sigh.

Original thread: https://forums.rpgmakerweb.com/threads/adjusting-line-height-in-text-window.94631/