Skip to content

Fix custom font fallback rendering#6485

Open
gta66666668 wants to merge 1 commit into
MeteorDevelopment:masterfrom
gta66666668:codex/chinese-font-fallback
Open

Fix custom font fallback rendering#6485
gta66666668 wants to merge 1 commit into
MeteorDevelopment:masterfrom
gta66666668:codex/chinese-font-fallback

Conversation

@gta66666668

Copy link
Copy Markdown

Fixes custom text rendering for glyphs that are not present in the selected Meteor font, such as Chinese characters.

The previous custom font renderer pre-packed a fixed set of Latin, Greek, Cyrillic, and symbol ranges. Characters outside those ranges could not render even when the OS had a suitable font installed.

Changes:

  • load an available system fallback font for common CJK font families
  • let Font use multiple font buffers
  • lazily pack missing glyphs into the texture atlas
  • upload pending glyphs before GUI/HUD custom text rendering
  • handle Unicode code points instead of only Java char values

Validation:

  • ./gradlew.bat build --stacktrace passes

This PR is based on master and does not include the Minecraft 26.2 update branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant