about summary refs log tree commit diff stats
path: root/apps/colors.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-08-29 22:16:34 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-29 22:20:09 -0700
commit6e05a8fa27139ddf75a029ad94d44b48a92785b2 (patch)
tree8d04ae5d057030246305c9dc4b46fb2fe176f643 /apps/colors.mu
parent4b90a26d71513f3b908b7f7ec651996ddf6460d6 (diff)
downloadmu-6e05a8fa27139ddf75a029ad94d44b48a92785b2.tar.gz
fix bad terminology: grapheme -> code point
Unix text-mode terminals transparently support utf-8 these days, and so
I treat utf-8 sequences (which I call graphemes in Mu) as fundamental.

I then blindly carried over this state of affairs to bare-metal Mu,
where it makes no sense. If you don't have a terminal handling
font-rendering for you, fonts are most often indexed by code points and
not utf-8 sequences.
Diffstat (limited to 'apps/colors.mu')
-rw-r--r--apps/colors.mu4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/colors.mu b/apps/colors.mu
index c58fec35..3d9f1bc1 100644
--- a/apps/colors.mu
+++ b/apps/colors.mu
@@ -27,8 +27,8 @@ fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk)
       loop-if-=
       var key2/eax: int <- copy key
       append-byte in, key2
-      var g/eax: grapheme <- copy key2
-      draw-grapheme-at-cursor-over-full-screen screen, g, 0xf/fg, 0/bg
+      var c/eax: code-point <- copy key2  # TODO: unicode input
+      draw-code-point-at-cursor-over-full-screen screen, c, 0xf/fg, 0/bg
       loop
     }
     clear-screen screen