diff --git a/conv-font/conv-font.js b/conv-font/conv-font.js
index ba50584d..9e25ae74 100644
--- a/conv-font/conv-font.js
+++ b/conv-font/conv-font.js
@@ -18,19 +18,34 @@ console.log("");
let num = font.numGlyphs;
for(let glyphIndex = 0; glyphIndex < num; glyphIndex++) {
let glyph = font.glyphs.get(glyphIndex);
- let path = glyph.getPath(0, 0, 72);
- if (path.commands.length === 0) {
+
+ // JS NOTE: without calling xMin the getContours return empty set.... :''(
+ glyph.xMin;
+ var contours = glyph.getContours();
+ if (contours.length === 0) {
+ // TODO: add compound support
continue;
}
if (glyph.unicodes.length === 0) {
continue; // with cmds, these are compound glyphs
}
let uni = glyph.unicodes.map(formatUnicode).join(', ');
- console.log("\t"); /*"advanceWidth=\""+glyph.advanceWidth+"\" "+
+ console.log("\t"); */
+ "leftSideBearing=\""+glyph.leftSideBearing+"\">");
+
+ for (let contourIndex = 0; contourIndex < contours.length; ++contourIndex) {
+ const contour = contours[contourIndex];
+ console.log("\t\t");
+ for (let i = 0; i < contour.length; ++i) {
+ let curr = contour[i];
+ console.log("\t\t\t");
+ }
+ console.log("\t\t");
+ //console.log(JSON.stringify(curr));
+ }
+ /*
for (i = 0; i < path.commands.length; i += 1) {
cmd = path.commands[i];
if (cmd.type === 'M') {
@@ -45,6 +60,7 @@ for(let glyphIndex = 0; glyphIndex < num; glyphIndex++) {
console.log("\t\t");
}
}
+ */``
console.log("\t");
}
console.log("");
diff --git a/conv-font/package.json b/conv-font/package.json
index 4cb46ce2..600f6489 100644
--- a/conv-font/package.json
+++ b/conv-font/package.json
@@ -4,13 +4,10 @@
"description": "Convert font data to XML intermediate.",
"private": true,
"scripts": {
- "start": "npm run-script conv0 && npm run-script conv1 && npm run-script conv2 && npm run-script conv3 && npm run-script conv4",
- "conv0": "node conv-font.js ../main-gdxapp/assets/font/free-sans.ttf > bin/free-sans.xml",
- "conv1": "node conv-font.js ../main-gdxapp/assets/font/noto-sans-cjkjp-medium.otf > bin/noto-sans-cjkjp-medium.xml",
- "conv2": "node conv-font.js ../main-gdxapp/assets/font/roboto-bold.ttf > bin/roboto-bold.xml",
- "conv3": "node conv-font.js ../main-gdxapp/assets/font/arslan-wessam.ttf > bin/arslan-wessam.xml",
- "conv4": "node conv-font.js ../main-gdxapp/assets/font/norse-kawl.otf > bin/norse-kawl.xml",
- "debug": "node conv-font.js ../main-gdxapp/assets/font/roboto-bold.ttf"
+ "start": "npm run-script conv0 && npm run-script conv1",
+ "conv0": "node conv-font.js ../main-gdxapp/assets/font/code2000.ttf > bin/code2000.xml",
+ "conv1": "node conv-font.js ../main-gdxapp/assets/font/free-sans.ttf > bin/free-sans.xml",
+ "debug": "node conv-font.js ../main-gdxapp/assets/font/free-sans.ttf"
},
"dependencies": {
"opentype.js": "1.3.4"
diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T10PartDecimal.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T10PartDecimal.java
index eb4bbd59..75c33f66 100644
--- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T10PartDecimal.java
+++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/base2t/part/T10PartDecimal.java
@@ -13,11 +13,11 @@ public enum T10PartDecimal implements BãßBȍőnPartAlt2ʸᴰ {
PART_1 ("˥","零","zero", "˥","꜒"),
PART_2 ("˦","壹","one", "˦","꜓"),
- PART_3 ("˧","貳","two", "˧","꜔"),
- PART_4 ("˨","參","three","˨","꜕"),
+ PART_3 ("˧","贰","two", "˧","꜔"),
+ PART_4 ("˨","叁","three","˨","꜕"),
PART_5 ("˩","肆","four", "˩","꜖"),
PART_6 ("꜖","伍","five", "꜌","꜑"),
- PART_7 ("꜕","陸","six", "꜋","꜐"),
+ PART_7 ("꜕","陆","six", "꜋","꜐"),
PART_8 ("꜔","柒","seven","꜊","꜏"),
PART_9 ("꜓","捌","eight","꜉","꜎"),
PART_10("꜒","玖","nine", "꜈","꜍"),
diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/glyph/BaseGlyphSet.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/glyph/BaseGlyphSet.java
index 11959eed..f28c5a9b 100644
--- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/glyph/BaseGlyphSet.java
+++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/glyph/BaseGlyphSet.java
@@ -52,11 +52,11 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ {
GREEK_HEX(GREEK.BȍőnGlyphSetNumber10(),
new BaseGlyphSetNumber("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ"),
GREEK.BȍőnGlyphSetNumber36()),
- CYRILLIC(new BaseGlyphSetNumber("⃝","А","В","Г","Д","Є","Ѕ","З","И","Ѳ"),
+ CYRILLIC(new BaseGlyphSetNumber("Ф","А","В","Г","Д","Є","Ѕ","З","И","Ѳ"),
LATIN_BASIC.BȍőnGlyphSetNumber16(),
new BaseGlyphSetNumber("А","В","Г","Д","Є","Ѕ","З","И","Ѳ","І","К","Л","М","Н","Ѯ","Ѻ","П","Ч","Р","С","Т","Ѵ","Ф","Х","Ѱ","Ѿ","Ц")),
CYRILLIC_HEX(CYRILLIC.BȍőnGlyphSetNumber10(),
- new BaseGlyphSetNumber("⃝","А","В","Г","Д","Є","Ѕ","З","И","Ѳ","҂"," ҈"," ҉"," ꙰"," ꙱"," ꙲"),
+ new BaseGlyphSetNumber("Ф","А","В","Г","Д","Є","Ѕ","З","И","Ѳ","҂"," ҈"," ҉"," ꙰"," ꙱"," ꙲"),
CYRILLIC.BȍőnGlyphSetNumber36()),
BENGALI(new BaseGlyphSetNumber("০","১","২","৩","৪","৫","৬","৭","৮","৯"),
LATIN_BASIC.BȍőnGlyphSetNumber16(),
@@ -64,6 +64,12 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ {
BENGALI_HEX(BENGALI.BȍőnGlyphSetNumber10(),
new BaseGlyphSetNumber("০","১","২","৩","৪","৫","৬","৭","৮","৯","জ্ঞ","ক্ষ","হ","স","ষ","শ"),
BENGALI.BȍőnGlyphSetNumber36()),
+ THAI(new BaseGlyphSetNumber("๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"),
+ LATIN_BASIC.BȍőnGlyphSetNumber16(),
+ new BaseGlyphSetNumber("๑","๒","๓","๔","๕","๖","๗","๘","๙","ก","ข","ค","ฆ","ง","จ","ฉ","ช","ฌ","ญ","ฎ","ฐ","ฑ","ฒ","ณ","ด","ท","ธ")),
+ THAI_HEX(THAI.BȍőnGlyphSetNumber10(),
+ new BaseGlyphSetNumber("๐","๑","๒","๓","๔","๕","๖","๗","๘","๙","ก","ข","ค","ฆ","ง","จ"),
+ THAI.BȍőnGlyphSetNumber36()),
RUNIC(new BaseGlyphSetNumber("ᛰ","ᚠ","ᚢ","ᚦ","ᚬ","ᚱ","ᚴ","ᚼ","ᚾ","ᛁ"),
LATIN_BASIC.BȍőnGlyphSetNumber16(),
@@ -84,10 +90,16 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ {
KOREAN_HEX.BȍőnGlyphSetNumber16().withAltGlyphSet(LATIN_TOP),
KOREAN_HEX.BȍőnGlyphSetNumber36()),
- CHINA_FINANCIAL_T(new BaseGlyphSetNumber(v -> T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(x.BȍőnChinaKey()))), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
- CHINA_FINANCIAL_S(new BaseGlyphSetNumber("零","壹","贰","叁","肆","伍","陆","柒","捌","玖"), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
- CHINA_NORMAL_T(new BaseGlyphSetNumber("零","一","二","三","四","五","六","七","八","九"), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
- CHINA_NORMAL_S(new BaseGlyphSetNumber("〇","一","二","三","四","五","六","七","八","九"), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
+ CHINA(
+ new BaseGlyphSetNumber("零","一","二","三","四","五","六","七","八","九"), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
+ CHINA_FORMAL(
+ new BaseGlyphSetNumber(v -> T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(x.BȍőnChinaKey()))), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
+ CHINA_FORMAL_OLD(
+ new BaseGlyphSetNumber("零","壹","貳","參","肆","伍","陸","柒","捌","玖"), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
+ JAPAN(
+ CHINA.BȍőnGlyphSetNumber10(), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
+ JAPAN_FORMAL(
+ new BaseGlyphSetNumber("零","壱","弐","参","四","五","六","七","八","九"), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
ARABIC(new BaseGlyphSetNumber("٠","١","٢","٣","٤","٥","٦","٧","٨","٩"),
LATIN_BASIC.BȍőnGlyphSetNumber16(),
diff --git a/main-gdxapp/assets/font/arslan-wessam.ttf b/main-gdxapp/assets/font/arslan-wessam.ttf
deleted file mode 100644
index 08a2c546..00000000
Binary files a/main-gdxapp/assets/font/arslan-wessam.ttf and /dev/null differ
diff --git a/main-gdxapp/assets/font/code2000.ttf b/main-gdxapp/assets/font/code2000.ttf
new file mode 100644
index 00000000..f077861c
Binary files /dev/null and b/main-gdxapp/assets/font/code2000.ttf differ
diff --git a/main-gdxapp/assets/font/norse-kawl.otf b/main-gdxapp/assets/font/norse-kawl.otf
deleted file mode 100644
index e78901c4..00000000
Binary files a/main-gdxapp/assets/font/norse-kawl.otf and /dev/null differ
diff --git a/main-gdxapp/assets/font/noto-sans-cjkjp-medium.otf b/main-gdxapp/assets/font/noto-sans-cjkjp-medium.otf
deleted file mode 100644
index 9b335868..00000000
Binary files a/main-gdxapp/assets/font/noto-sans-cjkjp-medium.otf and /dev/null differ
diff --git a/main-gdxapp/assets/font/roboto-bold.ttf b/main-gdxapp/assets/font/roboto-bold.ttf
deleted file mode 100644
index 8869666f..00000000
Binary files a/main-gdxapp/assets/font/roboto-bold.ttf and /dev/null differ
diff --git a/main-gdxapp/src/main/love/distributedrebirth/gdxapp/ImGuiSetup.java b/main-gdxapp/src/main/love/distributedrebirth/gdxapp/ImGuiSetup.java
index 7b7474b4..226f83ce 100644
--- a/main-gdxapp/src/main/love/distributedrebirth/gdxapp/ImGuiSetup.java
+++ b/main-gdxapp/src/main/love/distributedrebirth/gdxapp/ImGuiSetup.java
@@ -36,24 +36,19 @@ public class ImGuiSetup {
}
private static void initFonts(final ImGuiIO io) {
- io.getFonts().addFontDefault();
ImFontConfig fontConfig = new ImFontConfig();
- fontConfig.setMergeMode(true);
ImFontGlyphRangesBuilder fontBuilder = new ImFontGlyphRangesBuilder();
addRangeUnicodePlane0(fontBuilder);
final short[] glyphRanges = fontBuilder.buildRanges();
-
- io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/noto-sans-cjkjp-medium.otf").readBytes(), 14, fontConfig, glyphRanges);
- io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/free-sans.ttf").readBytes(), 14, fontConfig, glyphRanges);
- io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/roboto-bold.ttf").readBytes(), 14, fontConfig, glyphRanges);
- io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/arslan-wessam.ttf").readBytes(), 14, fontConfig, glyphRanges);
- io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/norse-kawl.otf").readBytes(), 14, fontConfig, glyphRanges);
-
+ io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/code2000.ttf").readBytes(), 24, fontConfig, glyphRanges);
+ fontConfig.setMergeMode(true);
+ // note: just for 3 sub chars for SUBHEX, but still missing 2 chars from T12 alt1 clock
+ io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/free-sans.ttf").readBytes(), 24, fontConfig, glyphRanges);
fontConfig.destroy();
}
private static void addRangeUnicodePlane0(ImFontGlyphRangesBuilder fontBuilder) {
- for (int c=0x0100;c<=0xFFEF;c++) {
+ for (int c=0x0001;c<=0xFFEF;c++) {
StringBuilder buf = new StringBuilder();
buf.append(""+(char)c);
fontBuilder.addText(buf.toString());
diff --git a/main-gdxapp/src/main/love/distributedrebirth/gdxapp/screen/SystemBaseGlyphRenderer.java b/main-gdxapp/src/main/love/distributedrebirth/gdxapp/screen/SystemBaseGlyphRenderer.java
index 4a6467a9..dfed3a0a 100644
--- a/main-gdxapp/src/main/love/distributedrebirth/gdxapp/screen/SystemBaseGlyphRenderer.java
+++ b/main-gdxapp/src/main/love/distributedrebirth/gdxapp/screen/SystemBaseGlyphRenderer.java
@@ -1,23 +1,16 @@
package love.distributedrebirth.gdxapp.screen;
-import java.util.ArrayList;
-import java.util.List;
-
import imgui.ImGui;
import imgui.flag.ImGuiCond;
import imgui.flag.ImGuiTableFlags;
import imgui.type.ImBoolean;
-import imgui.type.ImInt;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.gdxapp.GDXAppMain;
import love.distributedrebirth.gdxapp.ImGuiRendererMain;
import love.distributedrebirth.numberxd.glyph.BaseGlyphSet;
-import love.distributedrebirth.numberxd.glyph.BaseGlyphSetNumber;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class SystemBaseGlyphRenderer extends ImGuiRendererMain {
-
- private ImInt selectedGlyphPart = new ImInt();
public SystemBaseGlyphRenderer(GDXAppMain main) {
super(main);
@@ -27,83 +20,45 @@ public class SystemBaseGlyphRenderer extends ImGuiRendererMain {
public void render(ImBoolean widgetOpen) {
ImGui.setNextWindowPos(200, 200, ImGuiCond.FirstUseEver);
ImGui.setNextWindowSize(640, 480, ImGuiCond.FirstUseEver);
- if (ImGui.begin("Base glyph", widgetOpen)) {
- List bases = new ArrayList<>();
- for (BaseGlyphSet glyphSet:BaseGlyphSet.values()) {
- bases.add(glyphSet);
- }
- String[] items = new String[bases.size()];
- for (int i=0;i