Added secondCharGlyphSet
This commit is contained in:
parent
da248482cd
commit
a7ad3fb463
|
@ -18,8 +18,24 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
|
||||||
BENGALI(new BaseGlyphSetNumber10("০","১","২","৩","৪","৫","৬","৭","৮","৯")),
|
BENGALI(new BaseGlyphSetNumber10("০","১","২","৩","৪","৫","৬","৭","৮","৯")),
|
||||||
SINHALA(new BaseGlyphSetNumber10("෦","෧","෨","෩","෪","෫","෬","෭","෮","෯")),
|
SINHALA(new BaseGlyphSetNumber10("෦","෧","෨","෩","෪","෫","෬","෭","෮","෯")),
|
||||||
|
|
||||||
|
CHINA_FINANCIAL_T(new BaseGlyphSetNumber10("零","壹","貳","參","肆","伍","陸","柒","捌","玖")),
|
||||||
|
CHINA_FINANCIAL_S(new BaseGlyphSetNumber10("零","壹","贰","叁","肆","伍","陆","柒","捌","玖")),
|
||||||
|
CHINA_NORMAL_T(new BaseGlyphSetNumber10("零","一","二","三","四","五","六","七","八","九")),
|
||||||
|
CHINA_NORMAL_S(new BaseGlyphSetNumber10("〇","一","二","三","四","五","六","七","八","九"),
|
||||||
|
new BaseGlyphSetNumber16("氫","氦","鋰","鈹","硼","碳","氮","氧","氟","氖","鈉","鎂","鋁","矽","磷","硫")),
|
||||||
|
|
||||||
|
LATIN_DTMF(new BaseGlyphSetNumber10("zero","one","two","three","four","five","six","seven","eight","nine").withSeperator(" "),
|
||||||
|
new BaseGlyphSetNumber16("1","2","3","A","4","5","6","B","7","8","9","C","*","0","#","D")),
|
||||||
|
LATIN_SUPER(new BaseGlyphSetNumber10("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"),
|
||||||
|
new BaseGlyphSetNumber16("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","ᵃ","ᵇ","ᶜ","ᵈ","ᵉ","ᶠ")),
|
||||||
|
LATIN_SUB(new BaseGlyphSetNumber10("₀","₁","₂","₃","₄","₅","₆","₇","₈","₉"),
|
||||||
|
new BaseGlyphSetNumber16("₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","ₐ","₆","꜀","ₔ","ₑ","բ")),
|
||||||
|
LATIN_BASIC(new BaseGlyphSetNumber10("0","1","2","3","4","5","6","7","8","9"),
|
||||||
|
new BaseGlyphSetNumber16("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"),
|
||||||
|
new BaseGlyphSetNumber36("1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R")),
|
||||||
|
|
||||||
TONE_LETTER(new BaseGlyphSetNumber10("˥","˦","˧","˨","˩","꜒","꜓","꜔","꜕","꜖"),
|
TONE_LETTER(new BaseGlyphSetNumber10("˥","˦","˧","˨","˩","꜒","꜓","꜔","꜕","꜖"),
|
||||||
new BaseGlyphSetNumber16("˧˥˩","˧˩˥","˧˥˦","˧˩˨","˧˦˦","˧˨˨","˧˥˥","˧˩˩","˥˩˧","˩˥˧","˥˦˧","˩˨˧","˦˦˧","˨˨˧","˥˥˧","˩˩˧"),
|
new BaseGlyphSetNumber16("˧˥˩","˧˩˥","˧˥˦","˧˩˨","˧˦˦","˧˨˨","˧˥˥","˧˩˩","˥˩˧","˩˥˧","˥˦˧","˩˨˧","˦˦˧","˨˨˧","˥˥˧","˩˩˧").withSecondCharGlyphSet(BaseGlyphSet.LATIN_SUPER),
|
||||||
new BaseGlyphSetNumber36("꜊꜈","꜊꜉","꜊꜋","꜊꜌","꜊꜍","꜊꜎","꜊꜏","꜊꜐","꜊꜑","˧˥","˧˦","˧˨","˧˩","˧꜒","˧꜓","˧꜔","˧꜕","˧꜖","꜏˥","꜏˦","꜏˧","꜏˨","꜏˩","꜏꜍","꜏꜎","꜏꜐","꜏꜑")),
|
new BaseGlyphSetNumber36("꜊꜈","꜊꜉","꜊꜋","꜊꜌","꜊꜍","꜊꜎","꜊꜏","꜊꜐","꜊꜑","˧˥","˧˦","˧˨","˧˩","˧꜒","˧꜓","˧꜔","˧꜕","˧꜖","꜏˥","꜏˦","꜏˧","꜏˨","꜏˩","꜏꜍","꜏꜎","꜏꜐","꜏꜑")),
|
||||||
|
|
||||||
GREEK(new BaseGlyphSetNumber10("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ"),
|
GREEK(new BaseGlyphSetNumber10("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ"),
|
||||||
|
@ -30,17 +46,6 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
|
||||||
new BaseGlyphSetNumber16("ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ"),
|
new BaseGlyphSetNumber16("ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ"),
|
||||||
new BaseGlyphSetNumber36("ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ","ㄵ","ㄶ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ")),
|
new BaseGlyphSetNumber36("ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ","ㄵ","ㄶ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ")),
|
||||||
|
|
||||||
LATIN_BASIC(new BaseGlyphSetNumber10("0","1","2","3","4","5","6","7","8","9"),
|
|
||||||
new BaseGlyphSetNumber16("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"),
|
|
||||||
new BaseGlyphSetNumber36("1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R")),
|
|
||||||
|
|
||||||
LATIN_DTMF(new BaseGlyphSetNumber10("zero","one","two","three","four","five","six","seven","eight","nine").withSeperator(" "),
|
|
||||||
new BaseGlyphSetNumber16("1","2","3","A","4","5","6","B","7","8","9","C","*","0","#","D")),
|
|
||||||
LATIN_SUPER(new BaseGlyphSetNumber10("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"),
|
|
||||||
new BaseGlyphSetNumber16("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","ᵃ","ᵇ","ᶜ","ᵈ","ᵉ","ᶠ")),
|
|
||||||
LATIN_SUB(new BaseGlyphSetNumber10("₀","₁","₂","₃","₄","₅","₆","₇","₈","₉"),
|
|
||||||
new BaseGlyphSetNumber16("₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","ₐ","₆","꜀","ₔ","ₑ","բ")),
|
|
||||||
|
|
||||||
HEBREW(new BaseGlyphSetNumber10("אֶפֶס","אֶחָד","שְׁתַּיִם","שְׁלֹשָׁה","אַרְבַּע","חֲמִשָּׁה","שֵׁשׁ","שִׁבְעָה","שְׁמוֹנֶה","תִּשְׁעָה").withSeperator(" "),
|
HEBREW(new BaseGlyphSetNumber10("אֶפֶס","אֶחָד","שְׁתַּיִם","שְׁלֹשָׁה","אַרְבַּע","חֲמִשָּׁה","שֵׁשׁ","שִׁבְעָה","שְׁמוֹנֶה","תִּשְׁעָה").withSeperator(" "),
|
||||||
new BaseGlyphSetNumber36("א","ב","ג","ד","ה","ו","ז","ח","ט","י","כ","ל","מ","נ","ס ","ע","פ","צ","ק","ר","ש","ת","ך","ם","ן","ף","ץ")),
|
new BaseGlyphSetNumber36("א","ב","ג","ד","ה","ו","ז","ח","ט","י","כ","ל","מ","נ","ס ","ע","פ","צ","ק","ר","ש","ת","ך","ם","ן","ף","ץ")),
|
||||||
ARABIC(new BaseGlyphSetNumber10("٠","١","٢","٣","٤","٥","٦","٧","٨","٩"),
|
ARABIC(new BaseGlyphSetNumber10("٠","١","٢","٣","٤","٥","٦","٧","٨","٩"),
|
||||||
|
|
|
@ -7,6 +7,7 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||||
public final class BaseGlyphSetNumber16 implements BaseGlyphSetNumber {
|
public final class BaseGlyphSetNumber16 implements BaseGlyphSetNumber {
|
||||||
|
|
||||||
private String charSeperator;
|
private String charSeperator;
|
||||||
|
private BaseGlyphSet secondCharGlyphSet;
|
||||||
private final String char0;
|
private final String char0;
|
||||||
private final String char1;
|
private final String char1;
|
||||||
private final String char2;
|
private final String char2;
|
||||||
|
@ -51,6 +52,11 @@ public final class BaseGlyphSetNumber16 implements BaseGlyphSetNumber {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BaseGlyphSetNumber16 withSecondCharGlyphSet(BaseGlyphSet secondCharGlyphSet) {
|
||||||
|
this.secondCharGlyphSet = secondCharGlyphSet;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String BȍőnCharFor(int number) {
|
public String BȍőnCharFor(int number) {
|
||||||
switch (number) {
|
switch (number) {
|
||||||
|
@ -91,6 +97,10 @@ public final class BaseGlyphSetNumber16 implements BaseGlyphSetNumber {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BaseGlyphSet BȍőnSecondCharGlyphSet() {
|
||||||
|
return secondCharGlyphSet;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String BȍőnCharSeperator() {
|
public String BȍőnCharSeperator() {
|
||||||
return charSeperator;
|
return charSeperator;
|
||||||
|
|
|
@ -62,13 +62,21 @@ public interface BãßBȍőnPartʸᴰ<T extends BãßBȍőnPartʸᴰ<T>> extends
|
||||||
} else if (values.length <= 256) {
|
} else if (values.length <= 256) {
|
||||||
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() >> 4));
|
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() >> 4));
|
||||||
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
|
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
|
||||||
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F));
|
BaseGlyphSet secondGlyphSet = glyphSet.BȍőnGlyphSetNumber16().BȍőnSecondCharGlyphSet();
|
||||||
|
if (secondGlyphSet == null) {
|
||||||
|
secondGlyphSet = glyphSet;
|
||||||
|
}
|
||||||
|
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F));
|
||||||
} else if (values.length <= 0xFFF+1) {
|
} else if (values.length <= 0xFFF+1) {
|
||||||
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 8) & 0x0F));
|
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 8) & 0x0F));
|
||||||
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
|
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
|
||||||
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 4) & 0x0F));
|
BaseGlyphSet secondGlyphSet = glyphSet.BȍőnGlyphSetNumber16().BȍőnSecondCharGlyphSet();
|
||||||
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
|
if (secondGlyphSet == null) {
|
||||||
buf.append(glyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F));
|
secondGlyphSet = glyphSet;
|
||||||
|
}
|
||||||
|
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor((BȍőnRangTelNul() >> 4) & 0x0F));
|
||||||
|
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharSeperator());
|
||||||
|
buf.append(secondGlyphSet.BȍőnGlyphSetNumber16().BȍőnCharFor(BȍőnRangTelNul() & 0x0F));
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException("Can't handle more than 0xFFF values.");
|
throw new IllegalStateException("Can't handle more than 0xFFF values.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue