From 3d1b660c9f04743a905413a51c349addbf079100 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 3 Jun 2020 00:23:04 +0200 Subject: [PATCH] don't use nbsp for image codes --- MLEM/Formatting/Codes/ImageCode.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MLEM/Formatting/Codes/ImageCode.cs b/MLEM/Formatting/Codes/ImageCode.cs index 5557c2f..801d3c5 100644 --- a/MLEM/Formatting/Codes/ImageCode.cs +++ b/MLEM/Formatting/Codes/ImageCode.cs @@ -29,9 +29,7 @@ namespace MLEM.Formatting.Codes { /// public override string GetReplacementString(GenericFont font) { if (this.replacement == null) { - // use non-breaking space so that the image won't be line-splitted - var strg = font.GetWidthString(font.LineHeight, '\u00A0'); - this.replacement = strg.Remove(strg.Length - 1) + ' '; + this.replacement = font.GetWidthString(font.LineHeight); this.gapSize = font.MeasureString(this.replacement).X; } return this.replacement;