Add scalable OpenSans font test GUI and /kamkeel testfont command #256
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 renders a title and sample text at sizes 8, 12, 16, 24, 32, 48, 64 with per-line baseline markers and debug text (renderer path, atlas dims, GUI scale, scale factor).ScalableSdfFontRendererwhich loadsassets/customnpcs/OpenSans.ttffrom the classpath (ResourceLocation("customnpcs","OpenSans.ttf")), generates an SDF atlas and attempts GL20 shader rendering; if shader compilation fails it falls back to baking raster atlases per size (no single-bitmap upscaling); texture params set to linear filtering and clamp-to-edge and mipmaps disabled; GL state is saved/restored around rendering.GuiFontTestPacket(client-open packet) andTestCommandto expose/kamkeel testfont; registered the packet enumGUI_FONT_TEST, registered the packet inPacketHandler, and registered the command in the KAMKEEL command registry.src/main/java/kamkeel/npcs/client/gui/GuiFontTest.javasrc/main/java/kamkeel/npcs/client/renderer/font/ScalableSdfFontRenderer.javasrc/main/java/kamkeel/npcs/command/TestCommand.javasrc/main/java/kamkeel/npcs/network/packets/data/gui/GuiFontTestPacket.javasrc/main/java/kamkeel/npcs/command/CommandKamkeel.javasrc/main/java/kamkeel/npcs/network/PacketHandler.javasrc/main/java/kamkeel/npcs/network/enums/EnumDataPacket.javaTesting
git submodule sync --recursive && git submodule update --init --recursive, which completed successfully.rg --files src/main/resources | rg '\.ttf$'and foundsrc/main/resources/assets/customnpcs/OpenSans.ttf../gradlew compileJavaand observed a successful build:BUILD SUCCESSFUL in 2m 11s(18 actionable tasks: 18 executed).Codex Task