Map more common unicode chars to closely enough existing glyphs.
authorMatthew Mondor <mmondor@pulsar-zone.net>
Fri, 15 Apr 2022 14:48:20 +0000 (14:48 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Fri, 15 Apr 2022 14:48:20 +0000 (14:48 +0000)
MATT/TODO.txt
hacks/analogterm.c

index eb3f8fe..957a6c9 100644 (file)
@@ -14,10 +14,10 @@ TODO
   - May need to support sending XOFF/XON to control speed, if too fast it
     still jump scrolls, because the next scroll operation is requested before
     the smooth scrolling offset animation expires.
-    So far nice with a tool like: | sleepycat -s0 -l144 -w80
-    Where 150 is how many ms to delay per line and 80 is the width where
-    sleeping also occurs despite the lack of a newline.  144 was chosen since
-    it's a multiple of 8, the font's height.
+    So far nice with a tool like: | sleepycat -s0 -l152 -w80
+    Where -l is how many ms to delay per line and 80 is the width where
+    sleeping also occurs despite the lack of a newline.  -l was chosen as a
+    multiple of 8, the font's height.
   - When the cursor is down and a command is typed then the whole screen
     quickly refreshed, the scroll jump is a bit strange, similarly to a
     vertically desynched TV.  Unsure if some control flow somewhere or timer
@@ -25,7 +25,8 @@ TODO
   - It now can be enabled using ESC [?4h and disabled with [?4l.  Some
     applications may inadvertently disable it like dialog.  It would be good
     to have a command line option to enable it by default and prevent
-    disabling it.  dialog(1) appears to disable it.
+    disabling it, or to disable it, in which case it could not be ESC
+    activated.  dialog(1) appears to disable it.
   - Despite smooth scrolling taking the scroll region's top in consideration,
     since tmux(1) doesn't use it to protect its status bar, smooth scrolling
     works when it's configured to put its status bar at the top rather than at
@@ -35,16 +36,14 @@ TODO
     the terminal would work, considering that the rendering is actually drawn
     per scanline.  The cursor drawing code would also need to take this into
     account.
-- Various latin characters look strange and could be improved.
 - Links appears to enter DEC Special Graphics for some reason and to not exit
   it.  This does not happen under tmux(1).
-- ‘ ’ and
-  %s/“/"/e|%s/”/"/e|%s/’/'/e|%s/‘/'/e|%s/’/'/e|%s/″/"/e|%s/″/"/e|%s/“/"/e|%s/”/"/e
-  – – – — ― — ɔ ː ʃ
+- “/" ”/" ’/' ‘/' ’/' ″/" ″/" “/" ”/"
+- ɔ ː ʃ
 - When using French in UTF-8 mode on Ubuntu, some glyphs are missing, like the
   hyphen ‐ from
   https://en.wikipedia.org/wiki/General_Punctuation_%28Unicode_block%29
-  Remapped to - for now.
+  Remapped to - for now, but the hyphen is normally shorter than the minus.
 - Should probably remap utf8 0xc2a0 (UCS-32 A0) to normal space
   (it's the unbreaking space).
   Done
@@ -244,6 +243,10 @@ TODO
   even X11 video garbage.  Other exampes where application output interferes
   with input are aafire/cacafire and sometimes even cmatrix (on slow systems
   like RPI2).  The "chaos" seems mitigated when disabling multiple threads.
+- If the analogtv YIQ output could easily enough be converted to YUV, it could
+  be fed to xvideo(2) for hardware accelerated zooming.  The terminal could
+  also embed an efficient video recording feature using ffmpeg, also fed YUV.
+  However, a reasonably efficient RGB to YUV filter exists as part of ffmpeg.
 
 
 CONTROLS
index f1f0f5d..3662b5f 100644 (file)
@@ -486,8 +486,19 @@ at_glyph(analogterm_sim_t *sim, uint32_t c, bool decgfx)
                c = ' ';
                break;
        case 0x2010:    /* Hyphen */
+       case 0x2013:    /* FALLTHROUGH */
                c = '-';
                break;
+       case 0x2014:    /* Long dash */
+       case 0x2015:    /* FALLTHROUGH */
+               c = 0x1FB79;
+               break;
+       case 0x2018:    /* Open single quote */
+               c = 0x60;
+               break;
+       case 0x2019:    /* Close single quote */
+               c = 0xB4;
+               break;
        case 0x25B2:    /* Black up-pointing triangle */
                c = 0x1FB6F;
                break;