diff --git a/MareSynchronos/MareSynchronos.csproj b/MareSynchronos/MareSynchronos.csproj
index ab4c315..833774a 100644
--- a/MareSynchronos/MareSynchronos.csproj
+++ b/MareSynchronos/MareSynchronos.csproj
@@ -33,21 +33,21 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
-
+
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/MareSynchronos/UI/UISharedService.cs b/MareSynchronos/UI/UISharedService.cs
index f1a1876..a7bc5c3 100644
--- a/MareSynchronos/UI/UISharedService.cs
+++ b/MareSynchronos/UI/UISharedService.cs
@@ -113,38 +113,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
}));
});
GameFont = _pluginInterface.UiBuilder.FontAtlas.NewGameFontHandle(new(GameFontFamilyAndSize.Axis12));
- IconFont = _pluginInterface.UiBuilder.FontAtlas.NewDelegateFontHandle(e =>
- {
- e.OnPreBuild(tk => tk.AddFontAwesomeIconFont(new()
- {
- SizePx = _pluginInterface.UiBuilder.DefaultFontSpec.SizePx,
- GlyphMinAdvanceX = _pluginInterface.UiBuilder.DefaultFontSpec.SizePx,
- GlyphMaxAdvanceX = _pluginInterface.UiBuilder.DefaultFontSpec.SizePx
- }));
- e.OnPostBuild(tk =>
- {
- var font = tk.Font;
- var nsize = font.FontSize;
- var glyphs = font.GlyphsWrapped();
- foreach (ref var glyph in glyphs.DataSpan)
- {
- var ratio = 1f;
- if (glyph.X1 - glyph.X0 > nsize)
- ratio = Math.Max(ratio, (glyph.X1 - glyph.X0) / nsize);
- if (glyph.Y1 - glyph.Y0 > nsize)
- ratio = Math.Max(ratio, (glyph.Y1 - glyph.Y0) / nsize);
- var w = MathF.Round((glyph.X1 - glyph.X0) / ratio, MidpointRounding.ToZero);
- var h = MathF.Round((glyph.Y1 - glyph.Y0) / ratio, MidpointRounding.AwayFromZero);
- glyph.X0 = MathF.Round((nsize - w) / 2f, MidpointRounding.ToZero);
- glyph.Y0 = MathF.Round((nsize - h) / 2f, MidpointRounding.AwayFromZero);
- glyph.X1 = glyph.X0 + w;
- glyph.Y1 = glyph.Y0 + h;
- glyph.AdvanceX = nsize;
- }
-
- tk.BuildLookupTable(font);
- });
- });
+ IconFont = _pluginInterface.UiBuilder.IconFontFixedWidthHandle;
}
public ApiController ApiController => _apiController;
@@ -872,7 +841,6 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
base.Dispose(disposing);
- IconFont.Dispose();
UidFont.Dispose();
GameFont.Dispose();
}