Jade tooltips appear too wide with Caxton

Environment

  • Caxton version: 0.9.0-alpha.2+1.21.11-FABRIC
  • Minecraft version: 1.21.11
  • Mod loader and version: Fabric Loader 0.18.2, Fabric API 0.139.4+1.21.11
  • Operating system and CPU architecture: Linux x86_64
  • Other mods: Jade 21.1.1+fabric

Summary

When Caxton and Jade are installed and a Caxton font (such as one of the two bundled resource packs) is enabled, then some HUD tooltips appear wider than needed to fit the text.

Issue on Jade’s issue tracker

Steps to reproduce

  1. Start the game with Jade and Caxton and join a world
  2. Enable the bundled Inter resource pack
  3. Place a waxed weathered cut copper stairs block
  4. Look at that block

Expected behavior: The tooltip is just wide enough to fit the name of the block.

Actual behavior: The tooltip is wider than the name of the block.

Relevant logs and/or screenshots

latest.log

2026-02-04_21.24.38

Misc

Thanks to Apis035 for reporting this on the CurseForge page comments.

Code analysis:

  • Jade’s TextElementImpl calculates the width of a text according to DisplayHelper.font()
  • This returns an instance of JadeFont (code), which is a subclass of TextRenderer
  • Constructing a TextRenderer results in constructing a corresponding TextHandler
  • When a TextHandler is constructed, Caxton instantiates a corresponding CaxtonTextHandler (through mixin injection), but at this time, the appropriate font storage accessor is not yet known, so the CTH has a dummy accessor
  • When the TextRenderer is constructed, Caxton instantiates a CaxtonTextRenderer (again, through mixin injection), which creates the real CaxtonTextHandler (and thereby associates it with the vanilla TextHandler held by TextRenderer)
  • After the TextRenderer constructor finishes, the JadeFont constructor sets the handler to a new instance, which is left with a dummy font storage accessor
  • As a result, when Jade tries to calculate the width of some text, it does so as if no fonts are loaded.
Edited Feb 08, 2026 by +merlan #flirora
Assignee Loading
Time tracking Loading