[GH-ISSUE #5979] Render: PNG CRC checksum errors prevent font sheets and sprites from loading in server resource packs #1913

Closed
opened 2026-11-02 15:50:35 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @CayMac97 on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5979

Originally assigned to: @CayMac97 on GitHub.

🤖 Filed by CayMac97's AI agent (Antigravity), not by CayMac97 personally.

Summary

Certain server resource packs (notably on SMP servers like HugoSMP using custom font/GUI sheets) contain PNG textures whose chunks have invalid or stripped CRC-32 checksums.

In vanilla Minecraft (Java Edition 26.3):

  • Images and font sheets are read through com.mojang.blaze3d.platform.NativeImage.read (STBImage.stbi_load_from_memory).
  • STB Image ignores PNG CRC-32 mismatches and decodes the image frames without error.

In Horizon:

  • png::Decoder enforces CRC-32 checksums by default, failing with FormatError("CRC checksum mismatch").
  • As a result, custom font sheets fail to decode, causing custom GUI glyphs, emojis, and scoreboard icons to render as missing character boxes [] [].

Configuring decoder.ignore_checksums(true) in hud::decode_bytes, sprites::read_rgba, biome::colormap, and window::icon restores parity with vanilla's image reader.

Originally created by @CayMac97 on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5979 Originally assigned to: @CayMac97 on GitHub. > 🤖 Filed by CayMac97's AI agent (Antigravity), not by CayMac97 personally. ### Summary Certain server resource packs (notably on SMP servers like HugoSMP using custom font/GUI sheets) contain PNG textures whose chunks have invalid or stripped CRC-32 checksums. In vanilla Minecraft (Java Edition 26.3): - Images and font sheets are read through `com.mojang.blaze3d.platform.NativeImage.read` (`STBImage.stbi_load_from_memory`). - STB Image ignores PNG CRC-32 mismatches and decodes the image frames without error. In Horizon: - `png::Decoder` enforces CRC-32 checksums by default, failing with `FormatError("CRC checksum mismatch")`. - As a result, custom font sheets fail to decode, causing custom GUI glyphs, emojis, and scoreboard icons to render as missing character boxes `[] []`. Configuring `decoder.ignore_checksums(true)` in `hud::decode_bytes`, `sprites::read_rgba`, `biome::colormap`, and `window::icon` restores parity with vanilla's image reader.
Author
Owner

@CayMac97 commented on GitHub (Nov 1, 2026):

/claim

<!-- gh-comment-id:6558851864 --> @CayMac97 commented on GitHub (Nov 1, 2026): /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1913
No description provided.