Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-277677

Invalid font characters remember their width and the placeholder glyph incorrectly uses it

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • 1.21.2 Release Candidate 1
    • None
    • Community Consensus
    • Resource Packs

      Discovered while testing MC-277670.

      The bug

      If an invalid texture is used for a text character, the missing glyph will replace it. However, the character will still behave as though it has the expected size from the provided texture file.

      How to reproduce

      A resource pack is attached to this ticket that replaces "A" with a 257-wide, 1-high texture, and "a" with a 1-wide, 257-high texture. Both of these exceed the maximum dimensions for a font character.

      1. Download and apply the attached resource pack
      2. Observe the letters "A" and "a" in context
      3. Optionally compare to a character with no defined glyph: 

      Expected results

      These would appear as normal missing glyphs.

      Actual results

      "A" causes a huge gap after itself, and "a" bleeds into the next character.

      How to fix

      When making these use the missing glyph, it should also set the dimensions to the correct value.

            Unassigned Unassigned
            Awesoman3000 Connor Steppie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: