diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java index e65e0b7..435e04f 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java @@ -222,17 +222,9 @@ public class FourCornerUnicodeDisplay { @Override public void strobeNCR1632(BigInteger denominator, BigInteger numerator) { List math = new ArrayList<>(); - FourCornerUnicodeMapper.DICTIONARY.toScriptSuper(numerator).forEach(v -> { - for (int chr : v.cakePointSequence()) { - math.add(chr); - } - }); + FourCornerUnicodeMapper.DICTIONARY.toScriptSuper(numerator).forEach(v -> math.add(v.cakePointDotIndex())); math.add(FCDotCDC1604DashP6.NY02_BAR_V_RIGHT.ordinal()); - FourCornerUnicodeMapper.DICTIONARY.toScriptSub(denominator).forEach(v -> { - for (int chr : v.cakePointSequence()) { - math.add(chr); - } - }); + FourCornerUnicodeMapper.DICTIONARY.toScriptSub(denominator).forEach(v -> math.add(v.cakePointDotIndex())); renderFromInt18(math, output); } diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeMapper.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeMapper.java index 5e4265a..8f9a0cc 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeMapper.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeMapper.java @@ -163,24 +163,24 @@ public enum FourCornerUnicodeMapper { return result; } - public List toScriptSuper(int value) { + public List toScriptSuper(int value) { return toScript(Integer.toString(value), 0); } - public List toScriptSub(int value) { + public List toScriptSub(int value) { return toScript(Integer.toString(value), 10); } - public List toScriptSuper(BigInteger value) { + public List toScriptSuper(BigInteger value) { return toScript(value.toString(10), 0); } - public List toScriptSub(BigInteger value) { + public List toScriptSub(BigInteger value) { return toScript(value.toString(10), 10); } - private List toScript(String value, int off) { - List result = new ArrayList<>(); + private List toScript(String value, int off) { + List result = new ArrayList<>(); PrimitiveIterator.OfInt i = value.codePoints().iterator(); while (i.hasNext()) { int chr = i.nextInt();