mirror of
https://github.com/GTNewHorizons/GTNHLib.git
synced 2026-11-27 23:33:03 +00:00
Add a glyph replacement map (#219)
Co-authored-by: boubou19 <[email protected]>
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user