FC18: Made XML4 space larger and improved some cake slice names

This commit is contained in:
Willem Cazander 2025-08-18 15:45:47 +02:00
parent d176710f16
commit cac536251d
10 changed files with 149 additions and 1278 deletions

View file

@ -24,6 +24,7 @@ package org.x4o.fc18.cake2.pie9;
import java.util.ArrayList;
import java.util.List;
import java.util.PrimitiveIterator;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
@ -33,6 +34,7 @@ import org.x4o.fc18.cake2.FourCornerDotCake;
public class FCDotPIE9Test {
String pieChars;
String cakeChars;
public FCDotPIE9Test() {
int pieStart = FourCornerDotCake.FC_PIE9C_01.getStart();
@ -42,21 +44,88 @@ public class FCDotPIE9Test {
cakePoints.add(i);
}
FourCornerUnicodeDisplay disp = FourCornerUnicodeDisplay.text();
StringBuilder buf = new StringBuilder();
buf.append(disp.renderFromInt18(cakePoints));
pieChars = buf.toString();
pieChars = disp.renderFromInt18(cakePoints);
int cakeStart = FourCornerDotCake.FC_CDC1604_P6.getStart();
int cakeStop = FourCornerDotCake.FC_BYD0127_P7F.getStop();
for (int i = cakeStart; i <= cakeStop; i++) {
cakePoints.add(i);
}
cakeChars = disp.renderFromInt18(cakePoints);
}
@Test
public void testUnusedMath() throws Exception {
public void testUnusedUnicodeMath() throws Exception {
int totalMissing = 0;
for (int i = 0x2200; i <= 0x22FF; i++) {
String mathChar = new StringBuilder().appendCodePoint(i).toString();
if (!pieChars.contains(mathChar)) {
String testChar = new StringBuilder().appendCodePoint(i).toString();
if (!pieChars.contains(testChar)) {
totalMissing++;
//System.out.println(totalMissing + ":missing-math-chr: " + mathChar);
//System.out.println(totalMissing + ":missing-test-chr: " + testChar);
}
}
Assertions.assertTrue(totalMissing < 128, "To many math chars missing....");
}
@Test
public void testUnusedKuTen1And2() throws Exception {
// see: https://www.msx.org/wiki/KuTen_-_JIS_-_SJIS_Code_Conversion_Tables
String kuTenPage1 = "、 。 , . ・ : ; ? ! ゛ ゜ ´ ` ¨"+
"^  ̄ _ ヽ ヾ ゝ ゞ 〃 仝 々 〆 〇 ー ― ‐ / " +
"\ ~ ∥ | … ‥ ‘ ’ “ ” ( ) 〔 〕 [ ]" +
" } 〈 〉 《 》 「 」 『 』 【 】 + - ± ×" +
"÷ = ≠ < > ≦ ≧ ∞ ∴ ♂ ♀ ° ′ ″ ℃ ¥" +
"$ ¢ £ % # & * @ § ☆ ★ ○ ● ◎ ◇ ";
String kuTenPage2 = "◆ □ ■ △ ▲ ▽ ▼ ※ 〒 → ← ↑ ↓ 〓" +
"∈ ∋ ⊆ ⊇ ⊂ ⊃" +
"∪ ∩ ∧ ∨ ¬ ⇒ ⇔ ∀ " +
"∃ ∠ ⊥ ⌒ ∂ " +
"∇ ≡ ≒ ≪ ≫ √ ∽ ∝ ∵ ∫ ∬" +
"Å ‰ ♯ ♭ ♪ † ‡ ¶ ◯";
String kuTen = (kuTenPage1 + kuTenPage2).replaceAll("\t", "").replaceAll(" ", "");
int totalMissing = 0;
PrimitiveIterator.OfInt charCheck = kuTen.codePoints().iterator();
while (charCheck.hasNext()) {
String testChar = new StringBuilder().appendCodePoint(charCheck.next()).toString();
if (!cakeChars.contains(testChar)) {
totalMissing++;
//System.out.println(totalMissing + ":missing-test-chr: " + testChar);
}
}
Assertions.assertTrue(totalMissing < 128, "To many kuten chars missing....");
}
@Test
public void testUnusedVGATempleOS() throws Exception {
// see: https://github.com/rendello/templeos_font/blob/master/Convert/chars.txt
String vgaTOSChars = " !\"#$%&'()*+,-./"+
"0123456789:;<=>?" +
"@ABCDEFGHIJKLMNO" +
"PQRSTUVWXYZ[\\]^_" +
"`abcdefghijklmno" +
"pqrstuvwxyz{|}~ " +
"çüéâäàȧ êëèïîìÄȦ" +
"ÉæÆôöòûùÿÖÜ¢£¥ 𝑓" +
"áíóú ¿ ½¼¡«»" +
"░▒▓│┤╡╢╖╕╣║╗╝╜╛┐" +
"└┴┬├─┼╞╟╚╔╩╦╠═╬╧" +
"╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀" +
"αβΓπΣσμτΦθΩδ∞ ε " +
"≡±≤≥ ÷≈ √ⁿ² " +
"ВГЁЖЗИЙЛПУФЧШЪЫЭ" +
"ЮЯбвгёжзийклмнпт" +
"чшъыьэюя „”№ " +
" ⅠⅡ↑↓⭰⭲ " +
"ДЦЩдф щ ij🔔 " +
" ⅓ ¾ §¶ ";
int totalMissing = 0;
PrimitiveIterator.OfInt charCheck = vgaTOSChars.codePoints().iterator();
while (charCheck.hasNext()) {
String testChar = new StringBuilder().appendCodePoint(charCheck.next()).toString();
if (!cakeChars.contains(testChar)) {
totalMissing++;
//System.out.println(totalMissing + ":missing-test-chr: " + testChar);
}
}
Assertions.assertTrue(totalMissing < 128, "To many temple os chars missing....");
}
}