Fix ligatures and formatting

This commit is contained in:
dazedanon 2026-03-04 23:25:02 -06:00
parent ac54f8023c
commit d3d6876845
2 changed files with 13 additions and 2 deletions

View file

@ -530,7 +530,7 @@
"set",
"テキストピクチャの設定",
{
"text": "\\V[162] \\V[163] \\V[164]"
"text": "\\V[162]\n\\V[163]\n\\V[164]"
}
]
},
@ -538,7 +538,7 @@
"code": 657,
"indent": 0,
"parameters": [
"テキスト = \\V[162] \\V[163] \\V[164]"
"テキスト = \\V[162]\n\\V[163]\n\\V[164]"
]
},
{

View file

@ -125,3 +125,14 @@
}
}
})();
// Global ligature fix — prevents missing glyph blanks (fi, fl, ff, ft, etc.) across all text rendering.
(function() {
const _Bitmap_drawText = Bitmap.prototype.drawText;
Bitmap.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align) {
if (typeof text === "string") {
text = text.replace(/f([filt])/g, "f\u200C$1");
}
_Bitmap_drawText.call(this, text, x, y, maxWidth, lineHeight, align);
};
})();