Add a glyph replacement map (#219)

Co-authored-by: boubou19 <[email protected]>
This commit is contained in:
Death Fuelandboubou19 authored and GitHub committed 2025-12-05 20:43:51 +00:00
1 parent 046c5ba280
commit 628c003e3e
1 file changed
+22
@@ -0,0 +1,22 @@
package com.gtnewhorizon.gtnhlib.util.font;
import java.util.HashMap;
public class GlyphReplacements {
/**
* A mapping from custom glyphs to the values they are meant to replace (which may be null for novel glyphs or when
* the original comes from outside the BMP).
*/
public static final HashMap<String, String> customGlyphs = new HashMap<>(64);
public static String registerCustomGlyph(String replacement, String original) {
customGlyphs.put(replacement, original);
return replacement;
}
public static String registerCustomGlyph(String replacement) {
customGlyphs.put(replacement, null);
return replacement;
}
}