Skip to content

Commit

Permalink
Width dump honestly
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeRNG committed Jul 15, 2023
1 parent e099ff5 commit 6e11275
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ yarn_mappings=1.20+build.1
loader_version=0.14.21

# Mod Properties
mod_version=1.4.4
mod_version=1.4.5
maven_group=dev.dfonline
archives_base_name=CodeClient

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/dfonline/codeclient/Commands.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ public static void register(CommandDispatcher<FabricClientCommandSource> dispatc
})));

dispatcher.register(literal("widthdump").executes(context -> {
StringBuilder data = new StringBuilder("WIDTHDUMP\nFORMAT GOES AS\n<UNICODE> <WIDTH> <BOLD WIDTH>\n");
StringBuilder data = new StringBuilder("CODECLIENT WIDTHDUMP\nFORMAT GOES AS\n<UNICODE> <WIDTH>\n");
for (int codePoint = Character.MIN_CODE_POINT; codePoint <= Character.MAX_CODE_POINT; codePoint++) {
String character = new String(Character.toChars(codePoint));
TextRenderer renderer = CodeClient.MC.textRenderer;
data.append(character).append(" ").append(renderer.getWidth(character)).append(" ").append(renderer.getWidth(Text.literal(character).formatted(Formatting.BOLD))).append("\n");
data.append(character).append(" ").append(renderer.getWidth(character)).append("\n");
}
String dataFinal = data.toString();
try {
Expand Down
28 changes: 28 additions & 0 deletions widthdump.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6e11275

Please sign in to comment.