Redone font converter wip

This commit is contained in:
Willem Cazander 2022-02-21 00:41:24 +01:00
parent 9008ea2f22
commit 9f727d318f
18 changed files with 376 additions and 376 deletions

View file

@ -22,8 +22,8 @@ public class T10PartDecimalTest {
public void testToneMap() {
Assertions.assertEquals(T10PartDecimal.PART_1, T10PartDecimal.PART_1.BãßValueOfDialTone("˥"));
Assertions.assertEquals(T10PartDecimal.PART_2, T10PartDecimal.PART_1.BãßValueOfDialTone("˦"));
Assertions.assertEquals(T10PartDecimal.PART_9, T10PartDecimal.PART_1.BãßValueOfDialTone(""));
Assertions.assertEquals(T10PartDecimal.PART_10, T10PartDecimal.PART_1.BãßValueOfDialTone(""));
Assertions.assertEquals(T10PartDecimal.PART_9, T10PartDecimal.PART_1.BãßValueOfDialTone(""));
Assertions.assertEquals(T10PartDecimal.PART_10, T10PartDecimal.PART_1.BãßValueOfDialTone(""));
}
@Test

View file

@ -5,7 +5,10 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public enum CodePointCommandᶻᴰ {
NOP,
START, // PART_1 = modifier, PART_2 = direction
START_LR, // PART_1 = modifier
START_RL,
START_TB,
START_BT,
UNICODE,
NUMBER,
ADVANCE,

View file

@ -1,8 +1,11 @@
package love.distributedrebirth.unicode4d;
import java.util.List;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.numberxd.base2t.part.T02PartBinary;
import love.distributedrebirth.numberxd.base2t.type.V036Teger;
import love.distributedrebirth.numberxd.base2t.type.V072Tong;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public enum CodePointᶻᴰ {
@ -65,4 +68,28 @@ public enum CodePointᶻᴰ {
teger.getValue(T02PartBinary.PART_1).setValueNumber((value1 & MASK_ARGU) + (((mode >> 0) & 0b111) << 15));
teger.getValue(T02PartBinary.PART_2).setValueNumber((value2 & MASK_ARGU) + (((mode >> 3) & 0b111) << 15));
}
public int searchUnicode(List<V072Tong> tongs) {
for (V072Tong tong:tongs) {
if (CodePointCommandᶻᴰ.UNICODE.equals(CodePointᶻᴰ.INSTANCE.getCommand(tong.getValue(T02PartBinary.PART_1)))) {
return CodePointᶻᴰ.INSTANCE.getArgumentUnicode(tong.getValue(T02PartBinary.PART_1));
}
if (CodePointCommandᶻᴰ.UNICODE.equals(CodePointᶻᴰ.INSTANCE.getCommand(tong.getValue(T02PartBinary.PART_2)))) {
return CodePointᶻᴰ.INSTANCE.getArgumentUnicode(tong.getValue(T02PartBinary.PART_2));
}
}
return -1;
}
public int searchNumber(List<V072Tong> tongs) {
for (V072Tong tong:tongs) {
if (CodePointCommandᶻᴰ.NUMBER.equals(CodePointᶻᴰ.INSTANCE.getCommand(tong.getValue(T02PartBinary.PART_1)))) {
return CodePointᶻᴰ.INSTANCE.getArgumentUnicode(tong.getValue(T02PartBinary.PART_1));
}
if (CodePointCommandᶻᴰ.NUMBER.equals(CodePointᶻᴰ.INSTANCE.getCommand(tong.getValue(T02PartBinary.PART_2)))) {
return CodePointᶻᴰ.INSTANCE.getArgumentUnicode(tong.getValue(T02PartBinary.PART_2));
}
}
return -1;
}
}

View file

@ -34,7 +34,13 @@ public class Stringᶻᴰ {
int result = 0;
for (V072Tong points:string) {
CodePointCommandᶻᴰ cmd = CodePointᶻᴰ.INSTANCE.getCommand(points.getValue(T02PartBinary.PART_1));
if (cmd == CodePointCommandᶻᴰ.START) {
if (cmd == CodePointCommandᶻᴰ.START_LR) {
result++;
} else if (cmd == CodePointCommandᶻᴰ.START_RL) {
result++;
} else if (cmd == CodePointCommandᶻᴰ.START_TB) {
result++;
} else if (cmd == CodePointCommandᶻᴰ.START_BT) {
result++;
}
}

View file

@ -1,4 +1,4 @@
package love.distributedrebirth.unicode4d.base;
package love.distributedrebirth.unicode4d;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@ -19,17 +19,17 @@ public enum UnicodePlaneᶻᴰ {
CYRILLIC_SUPPLEMENT(0x0500,0x052F),
ARMENIAN(0x0530,0x058F),
HEBREW(0x0590,0x05FF),
ARABIC(0x0600,0x06FF),
SYRIAC(0x0700,0x074F),
ARABIC_SUPPLEMENT(0x0750,0x077F),
THAANA(0x0780,0x07BF),
NKO(0x07C0,0x07FF),
SAMARITAN(0x0800,0x083F),
MANDAIC(0x0840,0x085F),
SYRIAC_SUPPLEMENT(0x0860,0x086F),
ARABIC_EXTENDED_B(0x0870,0x089F),
ARABIV_EXTENDED_A(0x08A0,0x08FF),
HEBREW(0x0590,0x05FF, false),
ARABIC(0x0600,0x06FF, false),
SYRIAC(0x0700,0x074F, false),
ARABIC_SUPPLEMENT(0x0750,0x077F, false),
THAANA(0x0780,0x07BF, false),
NKO(0x07C0,0x07FF, false),
SAMARITAN(0x0800,0x083F, false),
MANDAIC(0x0840,0x085F, false),
SYRIAC_SUPPLEMENT(0x0860,0x086F, false),
ARABIC_EXTENDED_B(0x0870,0x089F, false),
ARABIV_EXTENDED_A(0x08A0,0x08FF, false),
DEVANAGARI(0x0900,0x097F),
BENGALI(0x0980,0x09FF),
@ -176,13 +176,13 @@ public enum UnicodePlaneᶻᴰ {
PRIVATE_USE_AREA (0xE000,0xF8FF),
CJK_COMPATIBILITY_IDEOGRAPHS (0xF900,0xFAFF),
ALPHABETIC_PRESENTATION_FORMS (0xFB00,0xFB4F),
ARABIC_PRESENTATION_FORMS_A (0xFB50,0xFDFF),
ARABIC_PRESENTATION_FORMS_A (0xFB50,0xFDFF, false),
VARIATION_SELECTORS (0xFE00,0xFE0F),
VERTICAL_FORMS (0xFE10,0xFE1F),
COMBINING_HALF_MARKS (0xFE20,0xFE2F),
CJK_COMPATIBILITY_FORMS (0xFE30,0xFE4F),
SMALL_FORM_VARIANTS (0xFE50,0xFE6F),
ARABIC_PRESENTATION_FORMS_B (0xFE70,0xFEFF),
ARABIC_PRESENTATION_FORMS_B (0xFE70,0xFEFF, false),
HALFWIDTH_AND_FULLWIDTH_FORMS (0xFF00,0xFFEF),
SPECIALS (0xFFF0,0xFFFF),
@ -201,7 +201,7 @@ public enum UnicodePlaneᶻᴰ {
GOTHIC (0x10330,0x1034F),
OLD_PERMIC (0x10350,0x1037F),
UGARITIC (0x10380,0x1039F),
OLD_PERSIAN (0x103A0,0x103DF),
OLD_PERSIAN (0x103A0,0x103DF, false),
DESERET (0x10400,0x1044F),
SHAVIAN (0x10450,0x1047F),
OSMANYA (0x10480,0x104AF),
@ -212,33 +212,33 @@ public enum UnicodePlaneᶻᴰ {
LINEAR_A (0x10600,0x1077F),
LATIN_EXTENDED_F (0x10780,0x107BF),
CYPRIOT_SYLLABARY (0x10800,0x1083F),
IMPERIAL_ARAMAIC (0x10840,0x1085F),
PALMYRENE (0x10860,0x1087F),
NABATAEAN (0x10880,0x108AF),
HATRAN (0x108E0,0x108FF),
PHOENICIAN (0x10900,0x1091F),
LYDIAN (0x10920,0x1093F),
MEROITIC_HIEROGLYPHS (0x10980,0x1099F),
MEROITIC_CURSIVE (0x109A0,0x109FF),
KHAROSHTHI (0x10A00,0x10A5F),
OLD_SOUTH_ARABIAN (0x10A60,0x10A7F),
OLD_NORTH_ARABIAN (0x10A80,0x10A9F),
MANICHAEAN (0x10AC0,0x10AFF),
AVESTAN (0x10B00,0x10B3F),
INSCRIPTIONAL_PARTHIAN (0x10B40,0x10B5F),
INSCRIPTIONAL_PAHLAVI (0x10B60,0x10B7F),
PSALTER_PAHLAVI (0x10B80,0x10BAF),
OLD_TURKIC (0x10C00,0x10C4F),
OLD_HUNGARIAN (0x10C80,0x10CFF),
HANIFI_ROHINGYA (0x10D00,0x10D3F),
RUMI_NUMERAL_SYMBOLS (0x10E60,0x10E7F),
YEZIDI (0x10E80,0x10EBF),
OLD_SOGDIAN (0x10F00,0x10F2F),
SOGDIAN (0x10F30,0x10F6F),
OLD_UYGHUR (0x10F70,0x10FAF),
CHORASMIAN (0x10FB0,0x10FDF),
ELYMAIC (0x10FE0,0x10FFF),
CYPRIOT_SYLLABARY (0x10800,0x1083F, false),
IMPERIAL_ARAMAIC (0x10840,0x1085F, false),
PALMYRENE (0x10860,0x1087F, false),
NABATAEAN (0x10880,0x108AF, false),
HATRAN (0x108E0,0x108FF, false),
PHOENICIAN (0x10900,0x1091F, false),
LYDIAN (0x10920,0x1093F, false),
MEROITIC_HIEROGLYPHS (0x10980,0x1099F, false),
MEROITIC_CURSIVE (0x109A0,0x109FF, false),
KHAROSHTHI (0x10A00,0x10A5F, false),
OLD_SOUTH_ARABIAN (0x10A60,0x10A7F, false),
OLD_NORTH_ARABIAN (0x10A80,0x10A9F, false),
MANICHAEAN (0x10AC0,0x10AFF, false),
AVESTAN (0x10B00,0x10B3F, false),
INSCRIPTIONAL_PARTHIAN (0x10B40,0x10B5F, false),
INSCRIPTIONAL_PAHLAVI (0x10B60,0x10B7F, false),
PSALTER_PAHLAVI (0x10B80,0x10BAF, false),
OLD_TURKIC (0x10C00,0x10C4F, false),
OLD_HUNGARIAN (0x10C80,0x10CFF, false),
HANIFI_ROHINGYA (0x10D00,0x10D3F, false),
RUMI_NUMERAL_SYMBOLS (0x10E60,0x10E7F, false),
YEZIDI (0x10E80,0x10EBF, false),
OLD_SOGDIAN (0x10F00,0x10F2F, false),
SOGDIAN (0x10F30,0x10F6F, false),
OLD_UYGHUR (0x10F70,0x10FAF, false),
CHORASMIAN (0x10FB0,0x10FDF, false),
ELYMAIC (0x10FE0,0x10FFF, false),
BRAHMI (0x11000,0x1107F),
KAITHI (0x11080,0x110CF),
@ -265,93 +265,118 @@ public enum UnicodePlaneᶻᴰ {
ZANABAZAR_SQUARE (0x11A00,0x11A4F),
SOYOMBO (0x11A50,0x11AAF),
UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_A (0X11AB0,0X11ABF),
UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_A (0x11AB0,0x11ABF),
PAU_CIN_HAU (0X11AC0,0X11AFF),
BHAIKSUKI (0X11C00,0X11C6F),
MARCHEN (0X11C70,0X11CBF),
MASARAM_GONDI (0X11D00,0X11D5F),
GUNJALA_GONDI (0X11D60,0X11DAF),
MAKASAR (0X11EE0,0X11EFF),
PAU_CIN_HAU (0x11AC0,0x11AFF),
BHAIKSUKI (0x11C00,0x11C6F),
MARCHEN (0x11C70,0x11CBF),
MASARAM_GONDI (0x11D00,0x11D5F),
GUNJALA_GONDI (0x11D60,0x11DAF),
MAKASAR (0x11EE0,0x11EFF),
LISU_SUPPLEMENT (0X11FB0,0X11FBF),
TAMIL_SUPPLEMENT (0X11FC0,0X11FFF),
CUNEIFORM (0X12000,0X123FF),
CUNEIFORM_NUMBERS_AND_PUNCTUATION (0X12400,0X1247F),
EARLY_DYNASTIC_CUNEIFORM (0X12480,0X1254F),
CYPRO_MINOAN (0X12F90,0X12FFF),
EGYPTIAN_HIEROGLYPHS (0X13000,0X1342F),
EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS (0X13430,0X1343F),
ANATOLIAN_HIEROGLYPHS (0X14400,0X1467F),
BAMUM_SUPPLEMENT (0X16800,0X16A3F),
MRO (0X16A40,0X16A6F),
TANGSA (0X16A70,0X16ACF),
BASSA_VAH (0X16AD0,0X16AFF),
PAHAWH_HMONG (0X16B00,0X16B8F),
MEDEFAIDRIN (0X16E40,0X16E9F),
MIAO (0X16F00,0X16F9F),
IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION (0X16FE0,0X16FFF),
TANGUT (0X17000,0X187FF),
TANGUT_COMPONENTS (0X18800,0X18AFF),
KHITAN_SMALL_SCRIPT (0X18B00,0X18CFF),
TANGUT_SUPPLEMENT (0X18D00,0X18D7F),
KANA_EXTENDED_B (0X1AFF0,0X1AFFF),
KANA_SUPPLEMENT (0X1B000,0X1B0FF),
KANA_EXTENDED_A (0X1B100,0X1B12F),
SMALL_KANA_EXTENSION (0X1B130,0X1B16F),
NUSHU (0X1B170,0X1B2FF),
DUPLOYAN (0X1BC00,0X1BC9F),
SHORTHAND_FORMAT_CONTROLS (0X1BCA0,0X1BCAF),
LISU_SUPPLEMENT (0x11FB0,0x11FBF),
TAMIL_SUPPLEMENT (0x11FC0,0x11FFF),
CUNEIFORM (0x12000,0x123FF),
CUNEIFORM_NUMBERS_AND_PUNCTUATION (0x12400,0x1247F),
EARLY_DYNASTIC_CUNEIFORM (0x12480,0x1254F),
CYPRO_MINOAN (0x12F90,0x12FFF),
EGYPTIAN_HIEROGLYPHS (0x13000,0x1342F),
EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS (0x13430,0x1343F),
ANATOLIAN_HIEROGLYPHS (0x14400,0x1467F),
BAMUM_SUPPLEMENT (0x16800,0x16A3F),
MRO (0x16A40,0x16A6F),
TANGSA (0x16A70,0x16ACF),
BASSA_VAH (0x16AD0,0x16AFF),
PAHAWH_HMONG (0x16B00,0x16B8F),
MEDEFAIDRIN (0x16E40,0x16E9F),
MIAO (0x16F00,0x16F9F),
IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION (0x16FE0,0x16FFF),
TANGUT (0x17000,0x187FF),
TANGUT_COMPONENTS (0x18800,0x18AFF),
KHITAN_SMALL_SCRIPT (0x18B00,0x18CFF),
TANGUT_SUPPLEMENT (0x18D00,0x18D7F),
KANA_EXTENDED_B (0x1AFF0,0x1AFFF),
KANA_SUPPLEMENT (0x1B000,0x1B0FF),
KANA_EXTENDED_A (0x1B100,0x1B12F),
SMALL_KANA_EXTENSION (0x1B130,0x1B16F),
NUSHU (0x1B170,0x1B2FF),
DUPLOYAN (0x1BC00,0x1BC9F),
SHORTHAND_FORMAT_CONTROLS (0x1BCA0,0x1BCAF),
ZNAMENNY_MUSICAL_NOTATION (0X1CF00,0X1CFCF),
BYZANTINE_MUSICAL_SYMBOLS (0X1D000,0X1D0FF),
MUSICAL_SYMBOLS (0X1D100,0X1D1FF),
ANCIENT_GREEK_MUSICAL_NOTATION (0X1D200,0X1D24F),
MAYAN_NUMERALS (0X1D2E0,0X1D2FF),
TAI_XUAN_JING_SYMBOLS (0X1D300,0X1D35F),
COUNTING_ROD_NUMERALS (0X1D360,0X1D37F),
MATHEMATICAL_ALPHANUMERIC_SYMBOLS (0X1D400,0X1D7FF),
SUTTON_SIGNWRITING (0X1D800,0X1DAAF),
ZNAMENNY_MUSICAL_NOTATION (0x1CF00,0x1CFCF),
BYZANTINE_MUSICAL_SYMBOLS (0x1D000,0x1D0FF),
MUSICAL_SYMBOLS (0x1D100,0x1D1FF),
ANCIENT_GREEK_MUSICAL_NOTATION (0x1D200,0x1D24F),
MAYAN_NUMERALS (0x1D2E0,0x1D2FF),
TAI_XUAN_JING_SYMBOLS (0x1D300,0x1D35F),
COUNTING_ROD_NUMERALS (0x1D360,0x1D37F),
MATHEMATICAL_ALPHANUMERIC_SYMBOLS (0x1D400,0x1D7FF),
SUTTON_SIGNWRITING (0x1D800,0x1DAAF),
LATIN_EXTENDED_G (0X1DF00,0X1DFFF),
GLAGOLITIC_SUPPLEMENT (0X1E000,0X1E02F),
NYIAKENG_PUACHUE_HMONG (0X1E100,0X1E14F),
TOTO (0X1E290,0X1E2BF),
WANCHO (0X1E2C0,0X1E2FF),
ETHIOPIC_EXTENDED_B (0X1E7E0,0X1E7FF),
MENDE_KIKAKUI (0X1E800,0X1E8DF),
ADLAM (0X1E900,0X1E95F),
INDIC_SIYAQ_NUMBERS (0X1EC70,0X1ECBF),
OTTOMAN_SIYAQ_NUMBERS (0X1ED00,0X1ED4F),
ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS (0X1EE00,0X1EEFF),
LATIN_EXTENDED_G (0x1DF00,0x1DFFF),
GLAGOLITIC_SUPPLEMENT (0x1E000,0x1E02F),
NYIAKENG_PUACHUE_HMONG (0x1E100,0x1E14F),
TOTO (0x1E290,0x1E2BF),
WANCHO (0x1E2C0,0x1E2FF),
ETHIOPIC_EXTENDED_B (0x1E7E0,0x1E7FF),
MENDE_KIKAKUI (0x1E800,0x1E8DF),
ADLAM (0x1E900,0x1E95F),
INDIC_SIYAQ_NUMBERS (0x1EC70,0x1ECBF),
OTTOMAN_SIYAQ_NUMBERS (0x1ED00,0x1ED4F),
ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS (0x1EE00,0x1EEFF, false),
MAHJONG_TILES (0X1F000,0X1F02F),
DOMINO_TILES (0X1F030,0X1F09F),
PLAYING_CARDS (0X1F0A0,0X1F0FF),
MAHJONG_TILES (0x1F000,0x1F02F),
DOMINO_TILES (0x1F030,0x1F09F),
PLAYING_CARDS (0x1F0A0,0x1F0FF),
ENCLOSED_ALPHANUMERIC_SUPPLEMENT (0X1F100,0X1F1FF),
ENCLOSED_IDEOGRAPHIC_SUPPLEMENT (0X1F200,0X1F2FF),
MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS (0X1F300,0X1F5FF),
EMOTICONS (0X1F600,0X1F64F),
ORNAMENTAL_DINGBATS (0X1F650,0X1F67F),
TRANSPORT_AND_MAP_SYMBOLS (0X1F680,0X1F6FF),
ALCHEMICAL_SYMBOLS (0X1F700,0X1F77F),
GEOMETRIC_SHAPES_EXTENDED (0X1F780,0X1F7FF),
SUPPLEMENTAL_ARROWS_C (0X1F800,0X1F8FF),
SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS (0X1F900,0X1F9FF),
CHESS_SYMBOLS (0X1FA00,0X1FA6F),
SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A (0X1FA70,0X1FAFF),
SYMBOLS_FOR_LEGACY_COMPUTING (0X1FB00,0X1FBFF),
ENCLOSED_ALPHANUMERIC_SUPPLEMENT (0x1F100,0x1F1FF),
ENCLOSED_IDEOGRAPHIC_SUPPLEMENT (0x1F200,0x1F2FF),
MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS (0x1F300,0x1F5FF),
EMOTICONS (0x1F600,0x1F64F),
ORNAMENTAL_DINGBATS (0x1F650,0x1F67F),
TRANSPORT_AND_MAP_SYMBOLS (0x1F680,0x1F6FF),
ALCHEMICAL_SYMBOLS (0x1F700,0x1F77F),
GEOMETRIC_SHAPES_EXTENDED (0x1F780,0x1F7FF),
SUPPLEMENTAL_ARROWS_C (0x1F800,0x1F8FF),
SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS (0x1F900,0x1F9FF),
CHESS_SYMBOLS (0x1FA00,0x1FA6F),
SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A (0x1FA70,0x1FAFF),
SYMBOLS_FOR_LEGACY_COMPUTING (0x1FB00,0x1FBFF),
UNKNOWN(0X1FC00,0XFFFFF)
// =========== PLANE 2
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B (0x20000,0x2A6DF),
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C (0x2A700,0x2B73F),
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D (0x2B740,0x2B81F),
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E (0x2B820,0x2CEAF),
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F (0x2CEB0,0x2EBEF),
CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT (0x2F800,0x2FA1F),
// =========== PLANE 3
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G (0x30000,0x3134F),
// =========== PLANE UNALLOCATED
UNALLOCATED(0x31350,0xFFFFF),
// =========== PLANE UNKNOWN
UNKNOWN(0x0FF00000,0x0FFFFFFF)
;
private final int start;
private final int stop;
private final boolean leftToRight;
private UnicodePlaneᶻᴰ(int start, int stop) {
this(start, stop, true);
}
private UnicodePlaneᶻᴰ(int start, int stop, boolean leftToRight) {
this.start = start;
this.stop = stop;
this.leftToRight = leftToRight;
}
public int getStart() {
@ -362,6 +387,10 @@ public enum UnicodePlaneᶻᴰ {
return stop;
}
public boolean isLeftToRight() {
return leftToRight;
}
public static UnicodePlaneᶻᴰ valueOfUnicode(int unicode) {
for (UnicodePlaneᶻᴰ value:values()) {
if (unicode >= value.getStart() && unicode <= value.getStop()) {

View file

@ -0,0 +1,35 @@
package love.distributedrebirth.unicode4d.atlas;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class FontAtlas {
private Map<String, FontAtlasStore> stores = new HashMap<>();
public FontAtlas() {
}
public FontAtlasStore getStoreByName(String name) {
return stores.get(name);
}
public Collection<FontAtlasStore> getStores() {
return stores.values();
}
public void setStores(List<FontAtlasStore> planes) {
for (FontAtlasStore plane:planes) {
addStore(plane);
}
}
public void addStore(FontAtlasStore plane) {
this.stores.put(plane.getName(), plane);
}
}

View file

@ -1,4 +1,4 @@
package love.distributedrebirth.unicode4d.base;
package love.distributedrebirth.unicode4d.atlas;
import org.x4o.xml.X4ODriver;
import org.x4o.xml.X4ODriverManager;
@ -6,9 +6,9 @@ import org.x4o.xml.X4ODriverManager;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class UnicodePlaneDriver extends X4ODriver<UnicodePlane> {
public class FontAtlasDriver extends X4ODriver<FontAtlas> {
static final public String LANGUAGE_NAME = "unicode-plane";
static final public String LANGUAGE_NAME = "unicode4d-atlas";
static final public String[] LANGUAGE_VERSIONS = new String[]{X4ODriver.DEFAULT_LANGUAGE_VERSION};
@Override
@ -21,7 +21,7 @@ public class UnicodePlaneDriver extends X4ODriver<UnicodePlane> {
return LANGUAGE_VERSIONS;
}
static public UnicodePlaneDriver newInstance() {
return (UnicodePlaneDriver)X4ODriverManager.getX4ODriver(LANGUAGE_NAME);
static public FontAtlasDriver newInstance() {
return (FontAtlasDriver)X4ODriverManager.getX4ODriver(LANGUAGE_NAME);
}
}

View file

@ -0,0 +1,38 @@
package love.distributedrebirth.unicode4d.atlas;
import java.util.ArrayList;
import java.util.List;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class FontAtlasStore {
private String name;
private List<FontAtlasStoreGlyph> glyphs = new ArrayList<>();
public FontAtlasStore() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<FontAtlasStoreGlyph> getGlyphs() {
return glyphs;
}
public void setGlyphs(List<FontAtlasStoreGlyph> glyphs) {
for (FontAtlasStoreGlyph baseGlyph:glyphs) {
addGlyph(baseGlyph);
}
}
public void addGlyph(FontAtlasStoreGlyph baseGlyph) {
this.glyphs.add(baseGlyph);
}
}

View file

@ -1,4 +1,4 @@
package love.distributedrebirth.unicode4d.base;
package love.distributedrebirth.unicode4d.atlas;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@ -12,38 +12,29 @@ import love.distributedrebirth.numberxd.base2t.Base2Terminator;
import love.distributedrebirth.numberxd.base2t.type.V072Tong;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class UnicodePlaneBaseGlyph {
public class FontAtlasStoreGlyph {
private String unicode;
private List<V072Tong> glyph = new ArrayList<>();
private List<V072Tong> tongs = new ArrayList<>();
public UnicodePlaneBaseGlyph() {
public FontAtlasStoreGlyph() {
}
public String getUnicode() {
return unicode;
public List<V072Tong> getTongs() {
return tongs;
}
public void setUnicode(String unicode) {
this.unicode = unicode;
public void setTongs(List<V072Tong> glyph) {
this.tongs = glyph;
}
public List<V072Tong> getGlyph() {
return glyph;
}
public void setGlyph(List<V072Tong> glyph) {
this.glyph = glyph;
}
public void addGlyph(V072Tong glyph) {
this.glyph.add(glyph);
public void addTong(V072Tong glyph) {
this.tongs.add(glyph);
}
public String getBase64() {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
Base2Terminator.INSTANCE.Bãß2WriteTong(glyph, baos);
Base2Terminator.INSTANCE.Bãß2WriteTong(tongs, baos);
} catch (IOException e) {
throw new RuntimeException(e);
}
@ -56,7 +47,7 @@ public class UnicodePlaneBaseGlyph {
try {
List<V072Tong> result = new ArrayList<>();
Base2Terminator.INSTANCE.Bãß2ReadTong(bais, result);
glyph = result;
tongs = result;
} catch (IOException e) {
throw new RuntimeException(e);
}

View file

@ -1,35 +0,0 @@
package love.distributedrebirth.unicode4d.base;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class UnicodePlane {
private Map<String, UnicodePlaneBase> planes = new HashMap<>();
public UnicodePlane() {
}
public UnicodePlaneBase getPlaneByName(String name) {
return planes.get(name);
}
public Collection<UnicodePlaneBase> getPlanes() {
return planes.values();
}
public void setPlanes(List<UnicodePlaneBase> planes) {
for (UnicodePlaneBase plane:planes) {
addPlane(plane);
}
}
public void addPlane(UnicodePlaneBase plane) {
this.planes.put(plane.getName(), plane);
}
}

View file

@ -1,44 +0,0 @@
package love.distributedrebirth.unicode4d.base;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class UnicodePlaneBase {
private String name;
private Map<String, UnicodePlaneBaseGlyph> baseGlyphs = new HashMap<>();
public UnicodePlaneBase() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public UnicodePlaneBaseGlyph getBaseGlyphByUnicode(String unicode) {
return baseGlyphs.get(unicode);
}
public Collection<UnicodePlaneBaseGlyph> getBaseGlyphs() {
return baseGlyphs.values();
}
public void setBaseGlyphs(List<UnicodePlaneBaseGlyph> baseGlyphs) {
for (UnicodePlaneBaseGlyph baseGlyph:baseGlyphs) {
addBaseGlyph(baseGlyph);
}
}
public void addBaseGlyph(UnicodePlaneBaseGlyph baseGlyph) {
this.baseGlyphs.put(baseGlyph.getUnicode(),baseGlyph);
}
}

View file

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<root:module xmlns:root="http://eld.x4o.org/xml/ns/eld-root"
xmlns:eld="http://eld.x4o.org/xml/ns/eld-lang"
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://eld.x4o.org/xml/ns/eld-root http://eld.x4o.org/xml/ns/eld-root-1.0.xsd"
providerHost="unicode-plane.x4o.distributedrebirth.love" providerName="UnicodePlane Encryption"
id="unicode-plane-module">
<eld:classBindingHandler id="UnicodePlane-UnicodePlaneBase"
parentClass="love.distributedrebirth.unicode4d.base.UnicodePlane"
childClass="love.distributedrebirth.unicode4d.base.UnicodePlaneBase"
addMethod="addPlane" getMethod="getPlanes" />
<eld:classBindingHandler id="UnicodePlaneBase-UnicodePlaneBaseGlyph"
parentClass="love.distributedrebirth.unicode4d.base.UnicodePlaneBase"
childClass="love.distributedrebirth.unicode4d.base.UnicodePlaneBaseGlyph"
addMethod="addBaseGlyph" getMethod="getBaseGlyphs" />
<eld:namespace
uri="http://unicode-plane.x4o.distributedrebirth.love/xml/ns/unicode-plane-root"
schemaUri="http://unicode-plane.x4o.distributedrebirth.love/xml/ns/unicode-plane-root-1.0.xsd"
schemaResource="unicode-plane-root-1.0.xsd" schemaPrefix="root"
description="Root namespace to have nice namespaceing."
name="UnicodePlane Root Namespace" languageRoot="true" id="root">
<eld:element tag="unicode"
objectClass="love.distributedrebirth.unicode4d.base.UnicodePlane"/>
</eld:namespace>
<eld:namespace
uri="http://unicode-plane.x4o.distributedrebirth.love/xml/ns/unicode-plane-lang"
schemaUri="http://unicode-plane.x4o.distributedrebirth.love/xml/ns/unicode-plane-lang-1.0.xsd"
schemaResource="unicode-plane-lang-1.0.xsd" schemaPrefix="l"
description="Language namespace to store unicode planes."
name="UnicodePlane Language Namespace" id="l">
<eld:element tag="plane"
objectClass="love.distributedrebirth.unicode4d.base.UnicodePlaneBase" />
<eld:element tag="glyph"
objectClass="love.distributedrebirth.unicode4d.base.UnicodePlaneBaseGlyph" />
</eld:namespace>
</root:module>

View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<root:module xmlns:root="http://eld.x4o.org/xml/ns/eld-root"
xmlns:eld="http://eld.x4o.org/xml/ns/eld-lang"
xmlns:conv="http://eld.x4o.org/xml/ns/eld-conv"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://eld.x4o.org/xml/ns/eld-root http://eld.x4o.org/xml/ns/eld-root-1.0.xsd"
providerHost="unicode4d-atlas.x4o.distributedrebirth.love" providerName="FontAtlas Glyph Store"
id="unicode4d-atlas-module">
<eld:classBindingHandler id="FontAtlas-FontAtlasStore"
parentClass="love.distributedrebirth.unicode4d.atlas.FontAtlas"
childClass="love.distributedrebirth.unicode4d.atlas.FontAtlasStore"
addMethod="addStore" getMethod="getStores" />
<eld:classBindingHandler id="FontAtlasStore-FontAtlasStoreGlyph"
parentClass="love.distributedrebirth.unicode4d.atlas.FontAtlasStore"
childClass="love.distributedrebirth.unicode4d.atlas.FontAtlasStoreGlyph"
addMethod="addGlyph" getMethod="getGlyphs" />
<eld:namespace
uri="http://unicode4d-atlas.x4o.distributedrebirth.love/xml/ns/unicode4d-atlas-root"
schemaUri="http://unicode4d-atlas.x4o.distributedrebirth.love/xml/ns/unicode4d-atlas-root-1.0.xsd"
schemaResource="unicode4d-atlas-root-1.0.xsd" schemaPrefix="r"
description="Namespace to have single root."
name="UnicodePlane Root Namespace" languageRoot="true" id="r">
<eld:element tag="a"
objectClass="love.distributedrebirth.unicode4d.atlas.FontAtlas"/>
</eld:namespace>
<eld:namespace
uri="http://unicode4d-atlas.x4o.distributedrebirth.love/xml/ns/unicode4d-atlas-lang"
schemaUri="http://unicode4d-atlas.x4o.distributedrebirth.love/xml/ns/unicode4d-atlas-lang-1.0.xsd"
schemaResource="unicode4d-atlas-lang-1.0.xsd" schemaPrefix="l"
description="Namespace to store glyphs."
name="UnicodePlane Language Namespace" id="l">
<eld:element tag="s"
objectClass="love.distributedrebirth.unicode4d.atlas.FontAtlasStore" />
<eld:element tag="g"
objectClass="love.distributedrebirth.unicode4d.atlas.FontAtlasStoreGlyph" />
</eld:namespace>
</root:module>

View file

@ -5,6 +5,6 @@
xsi:schemaLocation="http://language.x4o.org/xml/ns/modules http://language.x4o.org/xml/ns/modules-1.0.xsd"
>
<language version="1.0">
<eld-resource>unicode-plane-lang.eld</eld-resource>
<eld-resource>unicode4d-atlas-lang.eld</eld-resource>
</language>
</modules>

View file

@ -4,5 +4,5 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://language.x4o.org/xml/ns/drivers http://language.x4o.org/xml/ns/drivers-1.0.xsd"
>
<driver language="unicode-plane" className="love.distributedrebirth.unicode4d.base.UnicodePlaneDriver"/>
<driver language="unicode4d-atlas" className="love.distributedrebirth.unicode4d.atlas.FontAtlasDriver"/>
</drivers>

View file

@ -18,11 +18,10 @@ import org.xml.sax.XMLReader;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.numberxd.base2t.part.T02PartBinary;
import love.distributedrebirth.numberxd.base2t.type.V072Tong;
import love.distributedrebirth.unicode4d.base.UnicodePlane;
import love.distributedrebirth.unicode4d.base.UnicodePlaneBase;
import love.distributedrebirth.unicode4d.base.UnicodePlaneBaseGlyph;
import love.distributedrebirth.unicode4d.base.UnicodePlaneDriver;
import love.distributedrebirth.unicode4d.base.UnicodePlaneᶻᴰ;
import love.distributedrebirth.unicode4d.atlas.FontAtlas;
import love.distributedrebirth.unicode4d.atlas.FontAtlasDriver;
import love.distributedrebirth.unicode4d.atlas.FontAtlasStore;
import love.distributedrebirth.unicode4d.atlas.FontAtlasStoreGlyph;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class TestConvFont {
@ -33,97 +32,61 @@ public class TestConvFont {
}
public void run() {
UnicodePlane unicodePlane = new UnicodePlane();
try {
List<FontContentResult> results = new ArrayList<>();
// NOTE: Are in order like the FontAtlas of ImGui
results.add(conf(unicodePlane, new File("../conv-font/bin/code-2000.xml")));
results.add(conf(unicodePlane, new File("../conv-font/bin/code-2001.xml")));
results.add(conf(unicodePlane, new File("../conv-font/bin/code-2002.xml")));
results.add(conf(unicodePlane, new File("../conv-font/bin/free-sans.xml")));
results.add(conf(unicodePlane, new File("../conv-font/bin/new-gardiner-bmp.xml")));
results.add(conf(unicodePlane, new File("../conv-font/bin/fa-solid-900.xml")));
results.add(conf(unicodePlane, new File("../conv-font/bin/noto-sans-brahmi.xml")));
int totalChars = 0;
for (FontContentResult result:results) {
totalChars += result.getGlyphCounter();
}
System.out.println("Writing export unicode4d with characters: "+totalChars);
UnicodePlaneDriver.newInstance().createWriter().writeFile(unicodePlane, "../main-gdxapp/assets/font/unicode4d.xml");
for (FontContentResult result:results) {
System.out.println("Glyphs import: "+result.getGlyphCounter()+" dropped: "+result.getGlyphDropped()+" from: "+result.getInputName());
}
conf("Code2000", new File("../conv-font/bin/code-2000.xml"), new File("../main-gdxapp/assets/font/code-2000.xml"));
conf("Code2001", new File("../conv-font/bin/code-2001.xml"), new File("../main-gdxapp/assets/font/code-2001.xml"));
conf("Code2002", new File("../conv-font/bin/code-2002.xml"), new File("../main-gdxapp/assets/font/code-2002.xml"));
conf("Free Sans", new File("../conv-font/bin/free-sans.xml"), new File("../main-gdxapp/assets/font/free-sans.xml"));
conf("New Gardiner BMP", new File("../conv-font/bin/new-gardiner-bmp.xml"), new File("../main-gdxapp/assets/font/new-gardiner-bmp.xml"));
conf("Font Awesome", new File("../conv-font/bin/fa-solid-900.xml"), new File("../main-gdxapp/assets/font/fa-solid-900.xml"));
conf("Noto Sans Brahmi", new File("../conv-font/bin/noto-sans-brahmi.xml"), new File("../main-gdxapp/assets/font/noto-sans-brahmi.xml"));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public FontContentResult conf(UnicodePlane unicodePlane, File input) throws Exception {
public void conf(String fontName, File input, File output) throws Exception {
System.out.println("START WITH: "+input);
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
XMLReader reader = parser.getXMLReader();
FontContentHandler fontContentHandler = new FontContentHandler(unicodePlane, input.getName());
FontAtlas fontAtlas = new FontAtlas();
FontAtlasStore fontStore = new FontAtlasStore();
fontStore.setName(fontName);
fontAtlas.addStore(fontStore);
FontContentHandler fontContentHandler = new FontContentHandler(fontStore, input.getName());
reader.setContentHandler(fontContentHandler);
InputSource inputSource = new InputSource(new FileInputStream(input));
reader.parse(inputSource);
return fontContentHandler.getResult();
}
class FontContentResult {
private final String inputName;
private int glyphCounter = 0;
private int glyphDropped = 0;
public FontContentResult(String inputName) {
this.inputName = inputName;
}
FontAtlasDriver.newInstance().createWriter().writeFile(fontAtlas, output);
public String getInputName() {
return inputName;
}
public int getGlyphCounter() {
return glyphCounter;
}
public void incGlyphCounter() {
this.glyphCounter++;
}
public int getGlyphDropped() {
return glyphDropped;
}
public void incGlyphDropped() {
this.glyphDropped++;
}
System.out.println("END WITH: "+output+" wrote: "+fontContentHandler.getGlyphCounter());
}
class FontContentHandler implements ContentHandler {
private final UnicodePlane unicodePlane;
private final FontContentResult result;
private List<V072Tong> glyph;
private FontAtlasStore fontStore;
private int glyphCounter;
private List<V072Tong> tongs;
private boolean startPoint = false;
private V072Tong point = null;
private int unicode = -1;
private UnicodePlaneᶻᴰ unicodePlane2;
public FontContentHandler(UnicodePlane unicodePlane, String inputName) {
this.unicodePlane = unicodePlane;
this.result = new FontContentResult(inputName);
public FontContentHandler(FontAtlasStore fontStore, String inputName) {
this.fontStore = fontStore;
}
public FontContentResult getResult() {
return result;
public int getGlyphCounter() {
return glyphCounter;
}
@Override
@ -141,35 +104,12 @@ public class TestConvFont {
} else if ("glyph".equals(qName)) {
if (CodePointCommandᶻᴰ.NOP != CodePointᶻᴰ.INSTANCE.getCommand(point.getValue(T02PartBinary.PART_1))) {
glyph.add(point);
tongs.add(point);
}
UnicodePlaneᶻᴰ plane = UnicodePlaneᶻᴰ.valueOfUnicode(unicode);
UnicodePlaneBase planeBase = unicodePlane.getPlaneByName(plane.name());
if (planeBase == null) {
planeBase = new UnicodePlaneBase();
planeBase.setName(plane.name());
unicodePlane.addPlane(planeBase);
}
String unicodeHex = Integer.toHexString(unicode);
UnicodePlaneBaseGlyph baseGlyph = planeBase.getBaseGlyphByUnicode(unicodeHex);
if (baseGlyph != null) {
//System.out.println("============== DUP unicode: "+unicodeHex);
result.incGlyphDropped();
return;
}
result.incGlyphCounter();
baseGlyph = new UnicodePlaneBaseGlyph();
baseGlyph.setUnicode(unicodeHex);
baseGlyph.setGlyph(glyph);
planeBase.addBaseGlyph(baseGlyph);
//try {
//FileOutputStream out = new FileOutputStream("../conv-font/bin/test/"+unicode+".u4d");
//Base2Terminator.INSTANCE.Bãß2WriteTong(glyph, out);
//} catch (Exception e) {
// throw new SAXException(e);
//}
glyphCounter++;
FontAtlasStoreGlyph baseGlyph = new FontAtlasStoreGlyph();
baseGlyph.setTongs(tongs);
fontStore.addGlyph(baseGlyph);
} else if ("contour".equals(qName)) {
@ -206,12 +146,13 @@ public class TestConvFont {
if ("opentype".equals(qName)) {
} else if ("glyph".equals(qName)) {
glyph = new ArrayList<>();
tongs = new ArrayList<>();
point = new V072Tong();
CodePointᶻᴰ.INSTANCE.setCommand(point.getValue(T02PartBinary.PART_1), CodePointCommandᶻᴰ.NOP);
CodePointᶻᴰ.INSTANCE.setCommand(point.getValue(T02PartBinary.PART_2), CodePointCommandᶻᴰ.NOP);
unicode = Integer.parseInt(atts.getValue("unicode"), 16);
unicodePlane2 = UnicodePlaneᶻᴰ.valueOfUnicode(unicode);
int xMax = Integer.parseInt(atts.getValue("xMax"));
int yMax = Integer.parseInt(atts.getValue("yMax"));
int xMin = Integer.parseInt(atts.getValue("xMin"));
@ -223,7 +164,11 @@ public class TestConvFont {
V072Tong v1 = new V072Tong();
V072Tong v2 = new V072Tong();
CodePointᶻᴰ.INSTANCE.setCommand(v0.getValue(T02PartBinary.PART_1), CodePointCommandᶻᴰ.START);
if (unicodePlane2.isLeftToRight()) {
CodePointᶻᴰ.INSTANCE.setCommand(v0.getValue(T02PartBinary.PART_1), CodePointCommandᶻᴰ.START_LR);
} else {
CodePointᶻᴰ.INSTANCE.setCommand(v0.getValue(T02PartBinary.PART_1), CodePointCommandᶻᴰ.START_RL);
}
CodePointᶻᴰ.INSTANCE.setCommand(v0.getValue(T02PartBinary.PART_2), CodePointCommandᶻᴰ.UNICODE);
CodePointᶻᴰ.INSTANCE.setArgumentUnicode(v0.getValue(T02PartBinary.PART_2), unicode);
@ -242,9 +187,9 @@ public class TestConvFont {
CodePointᶻᴰ.INSTANCE.setCommand(v2.getValue(T02PartBinary.PART_2), CodePointCommandᶻᴰ.NOP);
glyph.add(v0);
glyph.add(v1);
glyph.add(v2);
tongs.add(v0);
tongs.add(v1);
tongs.add(v2);
} else if ("contour".equals(qName)) {
startPoint = true;
@ -274,7 +219,7 @@ public class TestConvFont {
CodePointᶻᴰ.INSTANCE.setArgument(point.getValue(part), T02PartBinary.PART_1, x);
CodePointᶻᴰ.INSTANCE.setArgument(point.getValue(part), T02PartBinary.PART_2, y);
if (part == T02PartBinary.PART_2) {
glyph.add(point);
tongs.add(point);
point = new V072Tong();
CodePointᶻᴰ.INSTANCE.setCommand(point.getValue(T02PartBinary.PART_1), CodePointCommandᶻᴰ.NOP);
CodePointᶻᴰ.INSTANCE.setCommand(point.getValue(T02PartBinary.PART_2), CodePointCommandᶻᴰ.NOP);

View file

@ -43,8 +43,8 @@ import love.distributedrebirth.numberxd.base2t.Base2PartsFactory;
import love.distributedrebirth.numberxd.base2t.Base2Terminator;
import love.distributedrebirth.numberxd.base2t.part.warp.TOSWarpCore;
import love.distributedrebirth.numberxd.glyph.BaseGlyphSet;
import love.distributedrebirth.unicode4d.base.UnicodePlane;
import love.distributedrebirth.unicode4d.base.UnicodePlaneDriver;
import love.distributedrebirth.unicode4d.atlas.FontAtlas;
import love.distributedrebirth.unicode4d.atlas.FontAtlasDriver;
import love.distributedrebirth.warpme.TOSWarpCoreDriver;
import love.distributedrebirth.warpme.core.WaterBucket;
import net.spookygames.gdx.nativefilechooser.NativeFileChooser;
@ -66,7 +66,7 @@ public enum GDXAppMain implements DefaultEnumInstanceᴶᴹˣ<GDXAppMain,GDXAppM
public int viewWidth;
public int viewHeight;
public MusicManager music;
public UnicodePlane basePlane;
public FontAtlas basePlane;
public ImBoolean showImGuiDemo = new ImBoolean(false);
private Map<Class<? extends Screen>,Screen> screens;
private DeskTopScreenMenu screenMenu;
@ -114,7 +114,7 @@ public enum GDXAppMain implements DefaultEnumInstanceᴶᴹˣ<GDXAppMain,GDXAppM
System.out.println("BãßBȍőnCoffinʸᴰ init done.");
try {
basePlane = UnicodePlaneDriver.newInstance().createReader().readString(Gdx.files.internal("font/unicode4d.xml").readString());
basePlane = FontAtlasDriver.newInstance().createReader().readString(Gdx.files.internal("font/unicode4d.xml").readString());
if (args.contains("warpcore-load")) {

View file

@ -1,5 +1,7 @@
package love.distributedrebirth.gdxapp.desktop.apps;
import java.util.List;
import imgui.ImColor;
import imgui.ImDrawList;
import imgui.ImGui;
@ -9,8 +11,9 @@ import love.distributedrebirth.gdxapp.GDXAppMain;
import love.distributedrebirth.gdxapp.desktop.DefaultDeskApp;
import love.distributedrebirth.gdxapp.desktop.DeskAppContourSection;
import love.distributedrebirth.gdxapp.desktop.DeskAppRenderer;
import love.distributedrebirth.unicode4d.base.UnicodePlaneBase;
import love.distributedrebirth.unicode4d.base.UnicodePlaneBaseGlyph;
import love.distributedrebirth.numberxd.base2t.type.V072Tong;
import love.distributedrebirth.unicode4d.atlas.FontAtlasStore;
import love.distributedrebirth.unicode4d.atlas.FontAtlasStoreGlyph;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class Unicode4DApp extends DefaultDeskApp implements DeskAppRenderer {
@ -24,8 +27,8 @@ public class Unicode4DApp extends DefaultDeskApp implements DeskAppRenderer {
public void render() {
ImGui.text("There is unicode and unicode4D");
UnicodePlaneBase plane = GDXAppMain.INSTANCE.basePlane.getPlaneByName("MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A");
UnicodePlaneBaseGlyph glyph = plane.getBaseGlyphByUnicode("27d6");
//FontAtlasStore plane = GDXAppMain.INSTANCE.basePlane.getPlaneByName("MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A");
FontAtlasStoreGlyph glyph = null; //plane.getBaseGlyphByUnicode("27d6");
ImCharacter c = new ImCharacter(glyph);
@ -34,10 +37,12 @@ public class Unicode4DApp extends DefaultDeskApp implements DeskAppRenderer {
class ImCharacter {
private final UnicodePlaneBaseGlyph glyph;
private final FontAtlasStoreGlyph glyph;
public ImCharacter(UnicodePlaneBaseGlyph glyph) {
public ImCharacter(FontAtlasStoreGlyph glyph) {
this.glyph = glyph;
List<V072Tong> tongs = glyph.getTongs();
}
public void render() {