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

Incorrect font spacing on non-BMP characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w18a
    • 20w17a
    • None
    • Confirmed
    • (Unassigned)

      Background

      I'm working on a resource pack which adds a language option for English using the Shaw Alphabet (or Shavian). The official Unicode characters for Shavian letters are in the range 0x10450 - 0x1047F, which is outside the Basic Multilingual Plane. Minecraft previously didn't recognise such characters so I used the old, unofficial, Private Use Area encoding (0xE700 - 0xE72F). That worked perfectly with my custom font (screenshot Correct appearance...).

      I read that 20w17a now supports non-BMP Unicode characters, so in addition to adding the latest items to my language file, I converted it (along with corresponding entries in my assets/minecraft/font/default.json) to the official Unicode encoding for Shavian.

      Issue

      Now the in-game text has incorrect spacing and shadows, with some letters even overlapping entirely (screenshot Bug with non-BMP characters). I only changed the character encoding, not the custom font PNG, so this doesn't seem to be a result of something I did wrong (as far as I know!).

      Reproduction

      Custom resource packs like this are not required to reproduce the issue - I noticed that even without a custom font, the 'tofu' (boxes, representing characters missing from the font) exhibit the same problem. It may be observed by copying and pasting Shavian text like this: 𐑞𐑦𐑕 𐑦𐑟 𐑩𐑯 𐑦𐑜𐑟𐑨𐑥𐑐𐑩𐑤 𐑝 𐑕𐑳𐑥 - 𐑖𐑱𐑝𐑦𐑩𐑯 𐑑𐑧𐑒𐑕𐑑. In previous versions this didn't occur (although two tofu would appear for each character, since of course non-BMP characters were unsupported anyway).

            boq [Mojang] Bartosz Bok
            FriedOrange79 Brad Neil
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: