Add /kamkeel testfont GUI and scalable OpenSans renderer#257
Open
Add /kamkeel testfont GUI and scalable OpenSans renderer#257
Conversation
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.
Motivation
Description
GuiFontTestthat hardcodes the discovered font pathassets/customnpcs/OpenSans.ttfand draws a title, sample text at sizes 8, 12, 16, 24, 32, 48, 64, baseline markers, and debug info. (new file:src/main/java/noppes/npcs/client/gui/GuiFontTest.java)ScalableFontRendererwhich loads the TTF from the classpath, builds an SDF atlas and renders via a GLSL (GL20) shader, with a deterministic per-size raster rebake fallback if shaders fail; atlas upload usesGL_LINEARfiltering andGL_CLAMP_TO_EDGE, glyphs rendered as quads batched withTessellator, and GL state is pushed/popped to avoid affecting vanilla GUI state. (new file:src/main/java/noppes/npcs/client/gui/font/ScalableFontRenderer.java)GuiFontTestPacketand a server-sideTestCommandmapped into the existing KAMKEEL command set so/kamkeel testfontopens the GUI client-side; packet and command are client-safe. (new files:src/main/java/kamkeel/npcs/network/packets/data/gui/GuiFontTestPacket.java,src/main/java/kamkeel/npcs/command/TestCommand.java)CommandKamkeelto register the command, addedGUI_FONT_TESTtoEnumDataPacket, and registered the packet inPacketHandler. (modified files:src/main/java/kamkeel/npcs/command/CommandKamkeel.java,src/main/java/kamkeel/npcs/network/enums/EnumDataPacket.java,src/main/java/kamkeel/npcs/network/PacketHandler.java)Testing
git submodule sync --recursiveandgit submodule update --init --recursiveto ensure API and gradle-plugin submodules were present; these completed successfully../gradlew compileJava; an environment toolchain issue was addressed during CI setup and the final build completed successfully withBUILD SUCCESSFUL.BUILD SUCCESSFUL in 2m 3s(compile task completed without errors).Codex Task