FC18: Moved APL punction lookalike pair to cake pie layer candy ring

This commit is contained in:
Willem Cazander 2025-08-02 22:21:46 +02:00
parent 9e9ad6af19
commit e8771e6c6b
7 changed files with 111 additions and 49 deletions

View file

@ -37,10 +37,10 @@ import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
*/
public enum FCDotPIE9CDash04 implements FourCornerDotCollePie9 {
NXX_01(' '),
NXX_02(' '),
NXX_03('∎'),
NXX_04(' '),
NXX_01('⍎'), // from APL
NXX_02('⍕'), // from APL
NXX_03('⌿'), // from APL
NXX_04('⍀'), // from APL
;
private final List<Integer> codePointDisplay;

View file

@ -37,22 +37,22 @@ import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
*/
public enum FCDotPIE9DDash16 implements FourCornerDotCollePie9 {
NXX_01(' '),
NXX_02(' '),
NXX_03(' '),
NXX_04(' '),
NXX_05(' '),
NXX_06(' '),
NXX_07(' '),
NXX_08(' '),
NXX_09(' '),
NXX_10(' '),
NXX_11(' '),
NXX_12(' '),
NXX_13(' '),
NXX_14(' '),
NXX_15(' '),
NXX_16(' '),
NXX_01(''),
NXX_02(''),
NXX_03(''),
NXX_04(''),
NXX_05(''),
NXX_06(''),
NXX_07(''),
NXX_08(''),
NXX_09(''),
NXX_10(''),
NXX_11(''),
NXX_12(''),
NXX_13(''),
NXX_14(''),
NXX_15(''),
NXX_16(''),
;
private final List<Integer> codePointDisplay;

View file

@ -37,23 +37,23 @@ import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
*/
public enum FCDotPIE9DDash17 implements FourCornerDotCollePie9 {
NXX_01(' '),
NXX_02(' '),
NXX_03(' '),
NXX_04(' '),
NXX_05(' '),
NXX_06(' '),
NXX_07(' '),
NXX_08(' '),
NXX_09(' '),
NXX_10(' '),
NXX_11(' '),
NXX_12(' '),
NXX_13(' '),
NXX_14(' '),
NXX_15(' '),
NXX_16(' '),
NXX_17(' '),
NXX_01(''),
NXX_02('⍣'), // from APL
NXX_03('∘'), // from APL
NXX_04('⍤'), // from APL
NXX_05(''),
NXX_06('⍨'), // from APL
NXX_07(''),
NXX_08(''),
NXX_09(''),
NXX_10(''),
NXX_11(''),
NXX_12('⍪'), // from APL
NXX_13('⋄'), // from APL
NXX_14(''),
NXX_15(''),
NXX_16(''),
NXX_17(''),
;
private final List<Integer> codePointDisplay;

View file

@ -75,17 +75,17 @@ public enum FCDotAPL0127DashP7A implements FourCornerDotColleZero33 {
// === 8 mirrors
/// SL190000
DOWN_TACK_JOT('⍎'),
__DOWN_TACK_JOT(' '),
/// SL200000
UP_TACK_JOT('⍕'),
__UP_TACK_JOT(' '),
/// SL150000
SLASH_BAR('⌿'),
__SLASH_BAR(' '),
/// SL160000
SLOPE_BAR('⍀'),
__SLOPE_BAR(' '),
/// SL010000
UP_STILE('⌈'),
__UP_STILE(' '),
/// SL020000
DOWN_STILE('⌊'),
__DOWN_STILE(' '),
/// SL030000 (used in GNU GPL)
__DEL(' '),
/// SL060000 (used in GNU GPL)

View file

@ -38,11 +38,11 @@ public enum FCDotAPL0127DashP7B implements FourCornerDotColleZero33 {
/// NEW from dynlog APL
__CIRCLE_DOT_XL(' '),
/// NEW from dynlog APL
CIRLCE_DOT('⍤'),
__CIRLCE_DOT(' '),
/// SL250000
JOT('∘'),
__JOT(' '),
/// NEW from dynlog APL
STAR_DOT('⍣'),
__STAR_DOT(' '),
// === ALGOL_60 <arithmetic operator> ::= + | - | × | / | ÷ |
@ -94,7 +94,7 @@ public enum FCDotAPL0127DashP7B implements FourCornerDotColleZero33 {
/// SL240000
IBEAM_TACK('⌶'),
/// NEW from DYNA
DOTTED_TILDE('⍨'),
__DOTTED_TILDE(' '),
/// SL450000
DIAERESIS('¨'),
// SL870000

View file

@ -44,7 +44,7 @@ public enum FCDotAPL0127DashP7C implements FourCornerDotColleZero33 {
/// SL740000
__RHO(' '),
/// NEW from dynlog APL
MINUS_COMMA('⍪'),
__MINUS_COMMA(' '),
/// --------- Left over from IBM APL
@ -71,7 +71,7 @@ public enum FCDotAPL0127DashP7C implements FourCornerDotColleZero33 {
// SL330000
__DELTA_UNDERBAR(' '), // GNU APL: user var: starts (A-Z) or one of the 3 characters _, , or
/// SL370000
LESS_GREATER('⋄'), // each stmt
__LESS_GREATER(' '), // each stmt
/// SL480000
__CIRCLE_PLUS(' '), // group
/// SL490000

View file

@ -0,0 +1,62 @@
/*
* Copyright (c) 2004-2014, Willem Cazander
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.x4o.fc18.cake2.pie9;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.x4o.fc18.FourCornerUnicodeDisplay;
import org.x4o.fc18.cake2.FourCornerDotCake;
public class FCDotPIE9Test {
String pieChars;
public FCDotPIE9Test() {
int pieStart = FourCornerDotCake.FC_PIE9C_01.getStart();
int pieStop = FourCornerDotCake.FC_PIE9D_27.getStop();
List<Integer> cakePoints = new ArrayList<>();
for (int i = pieStart; i <= pieStop; i++) {
cakePoints.add(i);
}
FourCornerUnicodeDisplay disp = FourCornerUnicodeDisplay.text();
StringBuilder buf = new StringBuilder();
buf.append(disp.renderFromInt18(cakePoints));
pieChars = buf.toString();
}
@Test
public void testUnusedMath() throws Exception {
int totalMissing = 0;
for (int i = 0x2200; i <= 0x22FF; i++) {
String mathChar = new StringBuilder().appendCodePoint(i).toString();
if (!pieChars.contains(mathChar)) {
totalMissing++;
//System.out.println(totalMissing + ":missing-math-chr: " + mathChar);
}
}
Assertions.assertTrue(totalMissing < 128, "To many math chars missing....");
}
}