Polymer Font Utils Mod adds a library API for generating font files in Minecraft. It uses the Polymer Resource Pack API to handle font resources, text, and bitmap glyphs. You can manage font spacing, advances, and custom icons right from your code.

Polymer Font Utils Mod

Features:

  • Generates font files using the Polymer Resource Pack API.
  • Creates a font resource manager to request custom fonts and text resources.
  • Loads bitmap glyphs from image files like PNGs with custom height and ascent values.
  • Provides font space utilities to request specific advances and spacing ranges.

Commands:

  • /pfu pfut:test: Shows a list of all bitmaps from the font manager.

Configuration:

Example code for setting up a font manager, requesting glyphs, and adjusting spacing:

public class PolymerFontUtilsTest implements ModInitializer {
    public static FontResourceManager manager;
    public static FontResource resource;
    public static TextResource text;
    public static BitmapGlyph glyph;

    @Override
    public void onInitialize() {
        PolymerResourcePackUtils.addModAssets("pfut");

        manager = FontResourceManager.create("pfut");
        resource = manager.requestFont("test");
        text = manager.requestText(-20); // Font identifier: pfut:text/default_-20
        glyph = resource.requestGlyph("font/icon.png", 128, 32);

        FontSpaceUtils.requestAdvance(-256);
        FontSpaceUtils.requestAdvances(-128, 1, 3);
        FontSpaceUtils.requestRange(2, 19);
    }
}

Polymer Font Utils Mod Download Links

Filter by

For Minecraft 1.21.4

Click to rate this post!
[Total: 0 Average: 0]