Guarantee rounding advanceX/kerning pair distances

This commit is contained in:
Soreepeong 2023-11-30 21:53:45 +09:00
parent aa3b991932
commit 47902f9770

View file

@ -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)