add custom font support for all client ui

- new FrosFont renderer: loads ttf/otf from fros/fonts/, rasterizes
  text to cached textures, falls back to the vanilla font when unset
- Font/FontSize settings in ClickGui (fontSize only shows when a font
  is set); missing files retry automatically every 2s
- all gui buttons, panels and hud modules now render through it
- handles section codes and styled components (watermark accent color)
This commit is contained in:
froslanz
2026-10-22 11:22:47 -04:00
parent d1cb9c8d3a
commit 30ccc6ea5a
14 changed files with 431 additions and 40 deletions
@@ -1,5 +1,7 @@
package cc.fros.features.gui;
import cc.fros.util.render.FrosFont;
import cc.fros.features.Feature;
import cc.fros.features.gui.items.Item;
import cc.fros.features.gui.items.buttons.Button;
@@ -193,6 +195,6 @@ public class Widget
}
protected void drawString(String text, double x, double y, int color) {
context.drawString(mc.font, text, (int) x, (int) y, color);
FrosFont.draw(context, text, (int) x, (int) y, color);
}
}