From 007d13b369f10005913cbbfe01af290fc8691428 Mon Sep 17 00:00:00 2001 From: Matthew Mondor Date: Sat, 30 Mar 2024 09:02:12 +0000 Subject: [PATCH] AnalogTerm2: Multiple changes - TODO update - Minor help fix - Explicitly initialize an unused element of an array still - Add two new aliases, "athight" and "atlowt" to alter the "t" default character, making it an ascender or not - Add a few 7x11 AnalogTerm ][ Even font style variants that can be loaded on top of the main at2-even font: - AY-variant - dashedzero, for an Apple ][/Signetics style 0 - boldpunctuation, for bolder/thicker general punctuation - f-variant, another look for "f" but unaligned with "t" - wideserif, widening some characters to fill more evenly - widecurved, a variant of the above. --- mmsoftware/analogterm2/TODO.txt | 24 ++++ .../fonts/7x11/at2-even-AY-variant-ansi.txt.gz | Bin 0 -> 116 bytes .../analogterm2/fonts/7x11/at2-even-AY-variant.txt | 37 ++++++ .../7x11/at2-even-boldpunctuation-ansi.txt.gz | Bin 0 -> 380 bytes .../fonts/7x11/at2-even-boldpunctuation.txt | 132 +++++++++++++++++++++ .../fonts/7x11/at2-even-dashedzero-ansi.txt.gz | Bin 0 -> 88 bytes .../analogterm2/fonts/7x11/at2-even-dashedzero.txt | 15 +++ .../fonts/7x11/at2-even-f-variant-ansi.txt.gz | Bin 0 -> 85 bytes .../analogterm2/fonts/7x11/at2-even-f-variant.txt | 16 +++ .../fonts/7x11/at2-even-widecurved-ansi.txt.gz | Bin 0 -> 286 bytes .../analogterm2/fonts/7x11/at2-even-widecurved.txt | 96 +++++++++++++++ .../fonts/7x11/at2-even-wideserif-ansi.txt.gz | Bin 0 -> 290 bytes .../analogterm2/fonts/7x11/at2-even-wideserif.txt | 111 +++++++++++++++++ mmsoftware/analogterm2/src/draw.c | 2 +- mmsoftware/analogterm2/src/main.c | 4 +- mmsoftware/analogterm2/src/screen.c | 1 + mmsoftware/analogterm2/tests/at2-aliases.sh | 2 + 17 files changed, 437 insertions(+), 3 deletions(-) create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-AY-variant-ansi.txt.gz create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-AY-variant.txt create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-boldpunctuation-ansi.txt.gz create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-boldpunctuation.txt create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-dashedzero-ansi.txt.gz create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-dashedzero.txt create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-f-variant-ansi.txt.gz create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-f-variant.txt create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-widecurved-ansi.txt.gz create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-widecurved.txt create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-wideserif-ansi.txt.gz create mode 100644 mmsoftware/analogterm2/fonts/7x11/at2-even-wideserif.txt diff --git a/mmsoftware/analogterm2/TODO.txt b/mmsoftware/analogterm2/TODO.txt index 47ad429..7adc11c 100644 --- a/mmsoftware/analogterm2/TODO.txt +++ b/mmsoftware/analogterm2/TODO.txt @@ -1,3 +1,27 @@ +- Maybe make the t an ascender in the default font, making it higher by one + pixel. Currently, because variants like "wideserif" and "widecurved" also + alter "t" and must stick to a common default, new aliases also allow to + switch between high and low t forms: "athight" and "atlowt". +- Maybe enlarge punctuation like () [] {} in the "even" at2 font? + Otherwise some characters really protrude downwards, like y... + Actually, this would look strange with digits or uppercase characters, + unless they are also higher. +- -I does not appear to behave as expected when in vim, where the cursor + appears to reset to "off" by default instead of not resetting at input. + Interestingly, this does not happen with the shell prompt. + atcurnodisable does not affect the situation. It is possible that it is due + to a cursor change command vim issues that also causes its state to be + reset. To investigate. +- Some terminals reset the cursor to off instead of to on at user input. + Maybe support this. A "cursor reset type" feature may be better to be able + to use the same option to control cursor options. + 0 - No reset + 1 - Reset at input + 2 - Reset at output + 3 - Reset at input and output + Then reset to on or off... Or, bits, so that a number can represent any of + wanted options. Or the equivalent with special letters/chars? +- Maybe add special escape sequences to control cursor reset features. - Maybe add non-ASCII characters to the PET20 font, including PETSCII where/if supported by Unicode. - Maybe add non-ASCII characters for the videoterm and ultraterm. diff --git a/mmsoftware/analogterm2/fonts/7x11/at2-even-AY-variant-ansi.txt.gz b/mmsoftware/analogterm2/fonts/7x11/at2-even-AY-variant-ansi.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..294abead0be9d17650e3ea44eb8aa5d6ce772a96 GIT binary patch literal 116 zcmV-)0E_=0iwFSy(FbM#19i}`4Ztu6MA1RAgpC0cQDl%Tko_kJN&RUko)F^hxG%R* z-|1#LYUX$jK<1eeNWlV literal 0 HcmV?d00001 diff --git a/mmsoftware/analogterm2/fonts/7x11/at2-even-AY-variant.txt b/mmsoftware/analogterm2/fonts/7x11/at2-even-AY-variant.txt new file mode 100644 index 0000000..30020c9 --- /dev/null +++ b/mmsoftware/analogterm2/fonts/7x11/at2-even-AY-variant.txt @@ -0,0 +1,37 @@ +# Variant for the A and Y uppercase characters that can be loaded on top of +# the default AT2 font. It is difficult to get all characters to look optimal +# at such font sizes and compromises are always necessary. +# In the original AT2 font, the A is like the Sygnetics/Apple ][ and IBM 3270 +# ones, pointy at top. For it to look properly, its center horizontal bar +# is misaligned, down by one pixel. This variant aligns the bar and uses a +# rounded square top, like for the "nosquare" font variant. +# In the original AT2 font, the Y is also like the Sygnetics and 3270, with +# a long vertical bar and a shortened top, which actually forks at the proper +# alignment point but still can look unbalanced. This variant compromises +# with a shorter vertical bar and a larger top. It still looks imbalanced. + +65 +....... +..OOO.. +.O...O. +.O...O. +.OOOOO. +.O...O. +.O...O. +.O...O. +....... +....... +....... + +89 +....... +.O...O. +.O...O. +.O...O. +..O.O.. +...O... +...O... +...O... +....... +....... +....... diff --git a/mmsoftware/analogterm2/fonts/7x11/at2-even-boldpunctuation-ansi.txt.gz b/mmsoftware/analogterm2/fonts/7x11/at2-even-boldpunctuation-ansi.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..88dcec059e61c73e9937a83ac9afda1d4d3d5840 GIT binary patch literal 380 zcmV-?0fYV@iwFSF(FbM#19g_ck;EVj1OwS577$vdcw8Wtz~vvo3H;oiZ;P@~djx*{ z{^VSdpPh5Ydylc-e=mTH+g^nG?#PGX!H=1YllSuB)r(ilG=z;Zsi;Nbr7Cu&{ zj20O!!Wo+48Jgx~5zUZzhID2KwxVP)I#UFDQQ~BAFpty?g8m zcthU`-qE)*=r+EUp!@q)NYX8krduFUw?L|Hfn+^Rn)Yd69_$KESF^er|J2+H{?^=z a(bb%;=5#fut2tfm(e)1jHW`r*3jhFPm$KOa literal 0 HcmV?d00001 diff --git a/mmsoftware/analogterm2/fonts/7x11/at2-even-boldpunctuation.txt b/mmsoftware/analogterm2/fonts/7x11/at2-even-boldpunctuation.txt new file mode 100644 index 0000000..461d109 --- /dev/null +++ b/mmsoftware/analogterm2/fonts/7x11/at2-even-boldpunctuation.txt @@ -0,0 +1,132 @@ +# More visible common punctuation characters. +# Can optionally be loaded on top of another font. + +33 +....... +...O... +..OOO.. +..OOO.. +...O... +...O... +....... +...O... +....... +....... +....... + +34 +....... +.OO.OO. +.OO.OO. +..O..O. +.O..O.. +....... +....... +....... +....... +....... +....... + +39 +....... +...OO.. +...OO.. +....O.. +...O... +....... +....... +....... +....... +....... +....... + +44 +....... +....... +....... +....... +....... +....... +..OO... +..OO... +...O... +..O.... +....... + +46 +....... +....... +....... +....... +....... +....... +..OO... +..OO... +....... +....... +....... + +58 +....... +....... +..OO... +..OO... +....... +....... +..OO... +..OO... +....... +....... +....... + +59 +....... +....... +..OO... +..OO... +....... +....... +..OO... +..OO... +...O... +..O.... +....... + +96 +....... +..OO... +..OO... +..O.... +...O... +....... +....... +....... +....... +....... +....... + +8220 +....... +.OO.OO. +.OO.OO. +.O..O.. +..O..O. +....... +....... +....... +....... +....... +....... + +8221 +....... +.OO.OO. +.OO.OO. +..O..O. +.O..O.. +....... +....... +....... +....... +....... +....... diff --git a/mmsoftware/analogterm2/fonts/7x11/at2-even-dashedzero-ansi.txt.gz b/mmsoftware/analogterm2/fonts/7x11/at2-even-dashedzero-ansi.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..fcaa8b2c449404dccea022c295f50793537706fd GIT binary patch literal 88 zcmV-e0H^;SiwFQp`0-@`19i`_4Ztu6MA1RKgaZdAy268af$TqlmHud-5b(#@8HHTT u2uz|lzadcbLo4M*hjOROc@U;N81im5`&aW%Q}s4gf9(ZQoj}bR0RRBZZzm4` literal 0 HcmV?d00001 diff --git a/mmsoftware/analogterm2/fonts/7x11/at2-even-dashedzero.txt b/mmsoftware/analogterm2/fonts/7x11/at2-even-dashedzero.txt new file mode 100644 index 0000000..4269795 --- /dev/null +++ b/mmsoftware/analogterm2/fonts/7x11/at2-even-dashedzero.txt @@ -0,0 +1,15 @@ +# Restore an Apple ][/Signetics like dashed-zero. +# May be loaded on top of other fonts of compatible size. + +48 +....... +..OOO.. +.O...O. +.O..OO. +.O.O.O. +.OO..O. +.O...O. +..OOO.. +....... +....... +....... diff --git a/mmsoftware/analogterm2/fonts/7x11/at2-even-f-variant-ansi.txt.gz b/mmsoftware/analogterm2/fonts/7x11/at2-even-f-variant-ansi.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..f15ecf87519b532cc136bf370c0810a58bb708b9 GIT binary patch literal 85 zcmV-b0IL5ViwFQ3(g$V$1Cx%nH#4;`F*CO|Gc`3aur@R>vNp(&#wLnG+|b(41giv4 r$_%T7F)j%cYcuS2nBvl5hD*X6mxKilZ&>2;9?0JS`3k!UCIJ8dU0oqa literal 0 HcmV?d00001 diff --git a/mmsoftware/analogterm2/fonts/7x11/at2-even-f-variant.txt b/mmsoftware/analogterm2/fonts/7x11/at2-even-f-variant.txt new file mode 100644 index 0000000..89a56af --- /dev/null +++ b/mmsoftware/analogterm2/fonts/7x11/at2-even-f-variant.txt @@ -0,0 +1,16 @@ +# This "f" has a more natural shape, with a lower bar, that no longer aligns +# with the horizontal bar of "t" and with the top of lowercase characters, +# with a less even result. + +102 +....... +...OOO. +..O.... +..O.... +.OOOO.. +..O.... +..O.... +..O.... +....... +....... +....... diff --git a/mmsoftware/analogterm2/fonts/7x11/at2-even-widecurved-ansi.txt.gz b/mmsoftware/analogterm2/fonts/7x11/at2-even-widecurved-ansi.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..484760193882cf8d2030a6282b3073898deb8f81 GIT binary patch literal 286 zcmV+(0pb21iwFQs(g$V$19gjDL%E{;@IpuM5d0QA zYm>NWLHNf)8Dh~X3}qWSv~l8tGn`(W;oP7U4NB3V6b(wzpcD;C;m5E+CK_bZAm*sY kra|y%&IJ0gU_Tb@$AbM>upbNdW8eP#0SA2Spu-0M02bzo4FCWD literal 0 HcmV?d00001 diff --git a/mmsoftware/analogterm2/fonts/7x11/at2-even-widecurved.txt b/mmsoftware/analogterm2/fonts/7x11/at2-even-widecurved.txt new file mode 100644 index 0000000..448e2a7 --- /dev/null +++ b/mmsoftware/analogterm2/fonts/7x11/at2-even-widecurved.txt @@ -0,0 +1,96 @@ +# Wide variants that fill more evenly. +# Also see the "wideserif" variant. +# For this to be complete, accented variants would also need to be +# implemented. + +49 +....... +...O... +..OO... +.O.O... +...O... +...O... +...O... +.OOOOO. +....... +....... +....... + +73 +....... +.OOOOO. +...O... +...O... +...O... +...O... +...O... +.OOOOO. +....... +....... +....... + +74 +....... +...OOO. +.....O. +.....O. +.....O. +.....O. +.O...O. +..OOO.. +....... +....... +....... + +105 +....... +...O... +....... +..OO... +...O... +...O... +...O... +....OO. +....... +....... +....... + +106 +....... +....O.. +....... +..OOO.. +....O.. +....O.. +....O.. +....O.. +.O..O.. +..OO... +....... + +108 +....... +.OOO... +...O... +...O... +...O... +...O... +...O... +....OO. +....... +....... +....... + +# More compatible with l and i. +116 +....... +....... +...O... +.OOOOO. +...O... +...O... +...O... +....OO. +....... +....... +....... diff --git a/mmsoftware/analogterm2/fonts/7x11/at2-even-wideserif-ansi.txt.gz b/mmsoftware/analogterm2/fonts/7x11/at2-even-wideserif-ansi.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..ad9eee8bdbb4020933c57e6ad330728d328c89cf GIT binary patch literal 290 zcmV+-0p0!|iwFQX(g$V$19gJAV*ZVNH)fqN)@I|! z`xPfW?uv8#Du34Xc>rW=m4sI8 z3Qph9@Fkw_1OgW*nBi2+a7t!4HZu#PXE^!!PR1jLqJmrfzQo}yC?*{mELsq6bOaB< zZ^5%Ry_sl1a36k03Pah3Fp0z)XEcursor_disabled && st->cursor_y == row && st->cursor_x == col && (! ((draw_cursor_blink_state && sc->focus) && - cursor_waitnext == 0))) { + cursor_waitnext == 0))) { /* XXX == 0 vs > 0 ?? */ if (cursor_waitnext > 0 && state->cursor_blink) { if (cursor_laststate != diff --git a/mmsoftware/analogterm2/src/main.c b/mmsoftware/analogterm2/src/main.c index 2248c2a..b52eac2 100644 --- a/mmsoftware/analogterm2/src/main.c +++ b/mmsoftware/analogterm2/src/main.c @@ -259,8 +259,8 @@ usage(void) " [?658467;65543[;]h and [?658467;65544h respectively,\n" " where the optional specifies the number of vertical\n" " pixels to jump per frame (1-4).\n" - " -I - If the cursor is blinking, do not reset its state to \"on\"" - " at user input.\n" + " -I - If the cursor is blinking, do not reset its state to\n" + " \"on\" at user input.\n" " -P - If the cursor is blinking, reset its timer for printing.\n" " By default, it is only reset \"on\" by user input.\n" " -m - Set default cursor style (0 = block, 1 = line, 2 = bar).\n" diff --git a/mmsoftware/analogterm2/src/screen.c b/mmsoftware/analogterm2/src/screen.c index e1ccaa3..6d529fa 100644 --- a/mmsoftware/analogterm2/src/screen.c +++ b/mmsoftware/analogterm2/src/screen.c @@ -417,6 +417,7 @@ write_utf8_char(int fd, unsigned char c) const int32_t *ucptr = uc, *uceptr = &ucptr[1]; uc[0] = (int32_t)c; + uc[1] = 0; if (utf8_encode(&utfptr, utfeptr, &ucptr, uceptr) == UTF8_CHARS_ARRAY_EMPTY) return write(fd, utf, utfptr - utf); diff --git a/mmsoftware/analogterm2/tests/at2-aliases.sh b/mmsoftware/analogterm2/tests/at2-aliases.sh index 0226688..c14a763 100755 --- a/mmsoftware/analogterm2/tests/at2-aliases.sh +++ b/mmsoftware/analogterm2/tests/at2-aliases.sh @@ -122,6 +122,8 @@ alias atintreverse="printf '\033[?658467;65539;0;85h\033[?658467;65539;1;5h\033[ # Font alias atdashedzero="printf '\033[?658467;65540;48;0;0h\033[?658467;65540;48;1;28h\033[?658467;65540;48;2;34h\033[?658467;65540;48;3;38h\033[?658467;65540;48;4;42h\033[?658467;65540;48;5;50h\033[?658467;65540;48;6;34h\033[?658467;65540;48;7;28h\033[?658467;65540;48;8;0h'" +alias athight="printf '\033[?658467;65540;116;1;8h'" +alias atlowt="printf '\033[?658467;65540;116;1;0h'" alias atfontreset="printf '\033[?658467;65540h'" alias atfontblank="printf '\033[?658467;65540;0h'" -- 2.9.0