1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-26 14:38:34 +01:00

don't use nbsp for image codes

This commit is contained in:
Ellpeck 2020-06-03 00:23:04 +02:00
parent 79e0e1a63e
commit 3d1b660c9f

View file

@ -29,9 +29,7 @@ namespace MLEM.Formatting.Codes {
/// <inheritdoc />
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;