Fix inconsistencies

This commit is contained in:
Soreepeong 2023-12-10 15:40:58 +09:00
parent 77536429d6
commit 3d576a0654
2 changed files with 7 additions and 7 deletions

View file

@ -398,8 +398,6 @@ internal sealed partial class FontAtlasFactory
config.GlyphMinAdvanceX = config.GlyphMinAdvanceX > 0 ? float.MaxValue : -float.MaxValue;
config.GlyphOffset *= this.Scale;
config.RasterizerGamma *= 1.4f;
}
}
@ -426,9 +424,7 @@ internal sealed partial class FontAtlasFactory
var scale = this.Scale;
foreach (ref var font in this.Fonts.DataSpan)
{
if (this.GlobalScaleExclusions.Contains(font))
font.AdjustGlyphMetrics(1f, 1f); // we still need to round advanceX and kerning
else
if (!this.GlobalScaleExclusions.Contains(font))
font.AdjustGlyphMetrics(1 / scale, scale);
foreach (var c in FallbackCodepoints)

View file

@ -621,8 +621,12 @@ internal class GamePrebakedFontHandle : IFontHandle.IInternal
if (addExtraLanguageGlyphs)
{
toolkitPreBuild.AddExtraGlyphsForDalamudLanguage(
new(toolkitPreBuild.FindConfigPtr(font)) { MergeFont = font });
var cfg = toolkitPreBuild.FindConfigPtr(font);
toolkitPreBuild.AddExtraGlyphsForDalamudLanguage(new()
{
MergeFont = cfg.DstFont,
SizePx = cfg.SizePixels,
});
}
var fas = GameFontStyle.GetRecommendedFamilyAndSize(style.Family, style.SizePt * toolkitPreBuild.Scale);