From 47902f977040014586d93b64c126ffe6c7166089 Mon Sep 17 00:00:00 2001 From: Soreepeong Date: Thu, 30 Nov 2023 21:53:45 +0900 Subject: [PATCH] Guarantee rounding advanceX/kerning pair distances --- .../Internals/FontAtlasFactory.BuildToolkit.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs index 4403d6400..4fa4c6a9e 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs @@ -426,7 +426,9 @@ internal sealed partial class FontAtlasFactory var scale = this.Scale; foreach (ref var font in this.Fonts.DataSpan) { - if (!this.GlobalScaleExclusions.Contains(font) && Math.Abs(scale - 1f) > 0f) + if (this.GlobalScaleExclusions.Contains(font)) + font.AdjustGlyphMetrics(1f, 1f); // we still need to round advanceX and kerning + else font.AdjustGlyphMetrics(1 / scale, scale); foreach (var c in FallbackCodepoints)