Create

Create

86M Downloads

Misaligned text in goggles tooltip overlay with ModernUI

Tidy-Bear opened this issue ยท 0 comments

commented

Describe the Bug

When using ModernUI together, text in goggles tooltip overlay will be misaligned and thus be partly covered by the item icon (goggles itself for default). It's quite weird to add 4 spaces to each text line as indentation directly instead of measuring the icon's width because the width of space characters varies in different fonts.
In fact, it has little to do with ModernUI. It happens to use a font as default, whose width of space character is different from the vanilla MC.

Relating issue: BloCamLimb/ModernUI#172

Reproduction Steps

  1. Installing ModernUI
  2. Wearing Engineer's Goggles
  3. Pointing at any machine with goggles information, showing goggles tooltip overlay
    ...

Expected Result

Goggles tooltip overlay looks as fine as the vanilla MC in different fonts.

Screenshots and Videos

Misaligned text

Crash Report or Log

No response

Operating System

Windows 10

Mod Version

0.5.1f

Minecraft Version

1.18.2

Forge Version

40.2.14

Other Mods

ModernUI

Additional Context

No response