Mojira Archive
MC-277677

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

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.

Won't Fix

Connor Steppie

2024-10-18, 02:58 PM

2024-10-22, 07:03 AM

2024-10-22, 07:03 AM

0

1

Community Consensus

Resource Packs

1.21.2 Release Candidate 1

-