From 3d7867feb2d0477333bea738fbdd2dadbb4e9c56 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 19 Mar 2020 17:36:53 +0100 Subject: [PATCH] possibly fix extended ignoring kerning in some cases --- MLEM.Extended/Font/GenericBitmapFont.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MLEM.Extended/Font/GenericBitmapFont.cs b/MLEM.Extended/Font/GenericBitmapFont.cs index f4845e8..edbc78b 100644 --- a/MLEM.Extended/Font/GenericBitmapFont.cs +++ b/MLEM.Extended/Font/GenericBitmapFont.cs @@ -17,6 +17,10 @@ namespace MLEM.Extended.Font { } public Vector2 MeasureString(string text) { + // For some reason, Extended's bitmap fonts don't take kerning into + // account when calculating the size of a single character + if (text.Length == 1) + text += ' '; return this.Font.MeasureString(text); }