Fix: CJK/Chinese text invisible when custom font enabled (I18n compatibility)#27
Open
lestmc wants to merge 1 commit into
Open
Fix: CJK/Chinese text invisible when custom font enabled (I18n compatibility)#27lestmc wants to merge 1 commit into
lestmc wants to merge 1 commit into
Conversation
…ibility) Text containing characters outside Latin ranges (e.g. CJK U+4E00+) would render as invisible quads because Meteor's Font atlas lacks those glyphs. Added a fallback path that uses Minecraft's built-in VanillaTextRenderer whenever the text contains non-Latin characters. Changes: - ColorUtils: new containsNonLatinChars() detection helper - CatppuccinRenderer: collectNonLatinTexts() + renderVanillaTexts() to batch-render non-Latin text via VanillaTextRenderer - GuiRendererMixin: always route custom-font text through CatppuccinRenderer.text() so the dispatch happens in one place - CatppuccinGuiTheme: textWidth/textHeight fall back to vanilla calculations for non-Latin text (avoids 0-width layout) - GuiRenderOperationAccessor + TextOperationAccessor: new mixin accessors for protected/private fields (registered in mixins.json) Closes X-C-0#24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当自定义字体启用时,CJK/中文文本会不可见。此修复通过
TextOperationAccessormixin 解决了 I18n 兼容性问题。修改内容
TextOperationAccessormixin,用于访问 Meteor Client 的文本操作