diff --git a/FModel/Creator/Bases/BaseSeason.cs b/FModel/Creator/Bases/BaseSeason.cs index d9832ccc..6e4adac9 100644 --- a/FModel/Creator/Bases/BaseSeason.cs +++ b/FModel/Creator/Bases/BaseSeason.cs @@ -204,14 +204,16 @@ namespace FModel.Creator.Bases break; } } - if (text.Any(char.IsDigit)) + //only trigger the fix if The Last char is a digit + if (char.IsDigit(text[text.Length - 1])) { int s = text.Count(k => Char.IsDigit(k)); + float numberwidth = paint.MeasureText(text.Substring(text.Length - s)); //Draw Number Separately c.DrawShapedText(shaper, text.Substring(text.Length - s), x, 155, paint); - c.DrawShapedText(shaper, text.Substring(0, text.Length - s), x + 60, 155, paint); + c.DrawShapedText(shaper, text.Substring(0, text.Length - s), x + numberwidth, 155, paint); } else { diff --git a/FModel/Creator/Bundles/HeaderStyle.cs b/FModel/Creator/Bundles/HeaderStyle.cs index 039c977f..c7adf174 100644 --- a/FModel/Creator/Bundles/HeaderStyle.cs +++ b/FModel/Creator/Bundles/HeaderStyle.cs @@ -96,18 +96,18 @@ namespace FModel.Creator.Bundles break; } } - if (text.Any(char.IsDigit)) + if (char.IsDigit(text[text.Length - 1])) { int s = text.Count(k => Char.IsDigit(k)); + float numberwidth = paint.MeasureText(text.Substring(text.Length - s)); c.DrawShapedText(shaper, text.Substring(text.Length - s), x, 155, paint); - c.DrawShapedText(shaper, text.Substring(0, text.Length - s), x + 60, 155, paint); + c.DrawShapedText(shaper, text.Substring(0, text.Length - s), x + numberwidth, 155, paint); } else { //feels bad man c.DrawShapedText(shaper, text, x, 155, paint); - } } else diff --git a/FModel/Creator/Bundles/QuestStyle.cs b/FModel/Creator/Bundles/QuestStyle.cs index 9578014a..ebf4fb3b 100644 --- a/FModel/Creator/Bundles/QuestStyle.cs +++ b/FModel/Creator/Bundles/QuestStyle.cs @@ -2,6 +2,8 @@ using FModel.Creator.Texts; using SkiaSharp; using SkiaSharp.HarfBuzz; +using System; +using System.Linq; namespace FModel.Creator.Bundles { @@ -50,8 +52,18 @@ namespace FModel.Creator.Bundles break; } } + if (char.IsDigit(q.Description[q.Description.Length - 1])) + { + int s = q.Description.Count(k => Char.IsDigit(k)); + c.DrawShapedText(shaper, q.Description.Substring(q.Description.Length - s), 65, y + paint.TextSize + 11, paint); - c.DrawShapedText(shaper, q.Description, 65, y + paint.TextSize + 11, paint); + c.DrawShapedText(shaper, q.Description.Substring(0, q.Description.Length - s), 115, y + paint.TextSize + 11, paint); + } + else + { + c.DrawShapedText(shaper, q.Description, 65, y + paint.TextSize + 11, paint); + + } } else {