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

Resourcepack's glyph_sizes.bin and some unicode_pages are only loaded on startup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 16w36a
    • Minecraft 13w48b, Minecraft 1.7.4, Minecraft 14w02c, Minecraft 14w04b, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 14w11b, Minecraft 1.7.6-pre1, Minecraft 1.7.6-pre2, Minecraft 14w20b, Minecraft 1.7.10, Minecraft 14w29a, Minecraft 14w29b, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.1, Minecraft 1.8.2-pre1, Minecraft 15w40b, Minecraft 1.8.9, Minecraft 15w51b, Minecraft 1.9.2, Minecraft 16w15b, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.9.3 Pre-Release 3, Minecraft 1.9.3, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 1.10 Pre-Release 1, Minecraft 1.10 Pre-Release 2, Minecraft 1.10, Minecraft 1.10.2, Minecraft 16w32a
    • Community Consensus

      What I expected to happen:
      When loading a custom resource pack, it would load that pack's /assets/minecraft/font/glyph_sizes.bin and the unicode_page_##.png files in /assets/minecraft/textures/font/.

      What actually happened:
      The game did not load glyph_sizes.bin at all, and also did not load various unicode_page files (those which are not found in the default resource pack). After the client was restarted completely (with the resource pack still selected), the game did load all of these files.

      Upon deselecting the pack, the game did not load the default glyph_sizes.bin, although it did unload all custom unicode_pages. This lead to fonts being kerned differently, even though Default was the only pack in use. Furthermore, attempting to switch back to the pack made it fail to load the custom unicode_page files, but as the glyph_sizes.bin is still in effect, caused the game to render black and magenta squares in place of the affected text.

      Steps to Reproduce:

      1. Download the attached "Private Use Test.zip" and place it in your resource pack folder.
      2. Load the game and enter a Creative world or server, and paste the following into a command block. Be sure to copy the entire thing; it's very long and has a horizontal scrollbar (triple-clicking the text should select the whole thing, depending on your browser):
        say 
      3. Press the button, and observe that nothing appears to get printed in chat, apart from the command block's own "[ @ ]".
      4. Select the Private Use Test resource pack.
      5. Press the button again. Observe that again, nothing except "[ @ ]" is printed in chat.
      6. Save and exit the world.
      7. Exit Minecraft completely.
      8. Start up Minecraft again, and re-enter the world you were in.
      9. Press the button now, and you'll see something like the attached "gsb_full_reload.png": a massive spam of icons and various characters. This is the intended result when using the resource pack.
      10. Switch back to the Default pack (or, at any rate, de-select the Private Use Test pack so it's no longer in use).
      11. Observe that the chat has changed to something similar to what you see in the attached "gsb_default.png": all printed characters have become black and magenta squares. These are the game's placeholder texture as the requested unicode_page files are not present in the Default resource pack.
      12. Select the Private Use Test pack again.
      13. Observe that the chat is essentially unchanged (black and magenta squares); refer to "gsb_reload.png". Despite working just a moment ago, Private Use Test has been broken simply by deselecting and reselecting it.

      Why this is a bug:
      Grum of Mojang has explicitly told players to modify glyph_sizes.bin in order to change the kerning/cropping of characters for custom fonts in resource packs.

      However, the game only loads glyph_sizes.bin once on startup: if we are intended (or at any rate, permitted) to change glyph_sizes.bin via resource packs, then the game should reload the file from the appropriate pack any time packs are changed. A resource pack should not have side-effects which carry over after the pack is deactivated ("gsb_default.png" clearly shows side-effects: it's a screenshot in default, but if it weren't for the pack's interference, nothing would have rendered).

      Furthermore, obviously, a pack using Mojang-condoned features should not require a full reload of the client in order to render properly, and should not be broken by the simple act of deselecting and reselecting it (as happened in "gsb_reload.png"). Without meeting this requirement, a pack cannot practically make use of the server-textures feature or resources.zip, as server textures and world-packaged resources are obviously not loaded on startup.


      Code analysis: https://bugs.mojang.com/browse/MC-41270?focusedCommentId=300478&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-300478

        1. Private Use Test.zip
          1003 kB
        2. gsb_default.png
          gsb_default.png
          140 kB
        3. gsb_full_reload.png
          gsb_full_reload.png
          280 kB
        4. gsb_reload.png
          gsb_reload.png
          139 kB
        5. 173rp_custom_glyphs.jpg
          173rp_custom_glyphs.jpg
          136 kB

            grum [Mojang] Grum (Erik Broes)
            wolfiemario WolfieMario
            Votes:
            28 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: