diff --git a/src/main/java/com/gtnewhorizon/gtnhlib/util/font/GlyphReplacements.java b/src/main/java/com/gtnewhorizon/gtnhlib/util/font/GlyphReplacements.java new file mode 100644 index 00000000..2bdead7d --- /dev/null +++ b/src/main/java/com/gtnewhorizon/gtnhlib/util/font/GlyphReplacements.java @@ -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 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; + } +}