diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-08-29 22:16:34 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-08-29 22:20:09 -0700 |
commit | 6e05a8fa27139ddf75a029ad94d44b48a92785b2 (patch) | |
tree | 8d04ae5d057030246305c9dc4b46fb2fe176f643 /shell | |
parent | 4b90a26d71513f3b908b7f7ec651996ddf6460d6 (diff) | |
download | mu-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 'shell')
-rw-r--r-- | shell/primitives.mu | 2 | ||||
-rw-r--r-- | shell/sandbox.mu | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/shell/primitives.mu b/shell/primitives.mu index d38eedbc..e955b531 100644 --- a/shell/primitives.mu +++ b/shell/primitives.mu @@ -3493,7 +3493,7 @@ fn apply-blit _args-ah: (addr handle cell), out: (addr handle cell), trace: (add var dest-ah/eax: (addr handle screen) <- get second, screen-data var dest/eax: (addr screen) <- lookup *dest-ah # - convert-graphemes-to-pixels src + convert-screen-cells-to-pixels src copy-pixels src, dest } diff --git a/shell/sandbox.mu b/shell/sandbox.mu index eb752b14..d50f47f0 100644 --- a/shell/sandbox.mu +++ b/shell/sandbox.mu @@ -255,8 +255,8 @@ fn render-empty-screen screen: (addr screen), _target-screen: (addr screen), xmi fn render-screen screen: (addr screen), _target-screen: (addr screen), xmin: int, ymin: int { var target-screen/esi: (addr screen) <- copy _target-screen - convert-graphemes-to-pixels target-screen # might overwrite existing pixel data with graphemes - # overlapping the two is not supported + convert-screen-cells-to-pixels target-screen # might overwrite existing pixel data with screen cells + # overlapping the two is not supported # pixel data { # screen top left pixels x y width height @@ -383,10 +383,10 @@ fn print-screen-cell-of-fake-screen screen: (addr screen), _target: (addr screen var index/ecx: int <- screen-cell-index target, x, y var offset/ecx: (offset screen-cell) <- compute-offset data, index var src-cell/esi: (addr screen-cell) <- index data, offset - var src-grapheme/eax: (addr grapheme) <- get src-cell, data + var src-code-point/eax: (addr code-point) <- get src-cell, data var src-color/ecx: (addr int) <- get src-cell, color var src-background-color/edx: (addr int) <- get src-cell, background-color - draw-grapheme-at-cursor-over-full-screen screen, *src-grapheme, *src-color, *src-background-color + draw-code-point-at-cursor-over-full-screen screen, *src-code-point, *src-color, *src-background-color } fn render-sandbox-edit-menu screen: (addr screen), _self: (addr sandbox) { |