Scale icons with font size

This commit is contained in:
Infi
2024-04-22 16:44:48 +02:00
parent 77ceffceef
commit 8ab450aa3e
4 changed files with 18 additions and 10 deletions
+6
View File
@@ -17,6 +17,8 @@ public class FontManager
internal IFontHandle RegularFont { get; private set; }
internal IFontHandle? ItalicFont { get; private set; }
internal IFontHandle FontAwesome { get; private set; }
private FaceData _regularFont;
private FaceData? _italicFont;
private FaceData _jpFont;
@@ -159,6 +161,10 @@ public class FontManager
SkewStrength = Plugin.Config.FontSize / 6
});
FontAwesome = Plugin.Interface.UiBuilder.FontAtlas.NewDelegateFontHandle(e =>
e.OnPreBuild(tk => tk.AddFontAwesomeIconFont(new SafeFontConfig { SizePx = Plugin.Config.FontSize })
));
RegularFont = Plugin.Interface.UiBuilder.FontAtlas.NewDelegateFontHandle(
e => e.OnPreBuild(
tk =>