Commit Graph

26 Commits

Author SHA1 Message Date
Kartik K. Agaram d253a31828 rename grapheme to code-point-utf8
Longer name, but it doesn't lie. We have no data structure right now for
combining multiple code points. And it makes no sense for the notion of
a grapheme to conflate its Unicode encoding.
2021-11-09 08:12:11 -08:00
Kartik K. Agaram a54b2cb7af . 2021-10-11 21:24:33 -07:00
Kartik K. Agaram 60a50c9245 support combining characters in streams of text
Fake screens can't handle them yet.
2021-09-02 15:38:45 -07:00
Kartik K. Agaram 6e05a8fa27 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.
2021-08-29 22:20:09 -07:00
Kartik K. Agaram 7e70d3ac04 bugfix in commit 8e182e394
Any command in shell that rendered the screen resulted in an infinite
loop. But it took me forever to even realize it was an infinite loop.
2021-08-29 00:51:57 -07:00
Kartik K. Agaram 8e182e394e width-aware drawing primitives
No support yet for drawing wide graphemes.
2021-08-29 00:01:08 -07:00
Kartik K. Agaram 468927ee1c . 2021-08-28 22:22:04 -07:00
Kartik K. Agaram 3640f1dfe9 support unused screen-cells in fake screens
We'll need this when rendering 16-bit glyphs. They'll occupy two
8x16 display units on screen, but the grapheme is a single unit as far
as fake screens are concerned.
2021-08-28 22:01:26 -07:00
Kartik K. Agaram 2e00a9c288 .
Convert some old code to current idioms.
2021-08-28 21:53:37 -07:00
Kartik K. Agaram bca7f834c3 . 2021-06-15 21:40:40 -07:00
Kartik K. Agaram c2c6f4c7ab flickerlessly render fake screens in environment
Font rendering now happens off the real screen, which provides the effect
of double-buffering.

Apps can now also use convert-graphemes-to-pixels for more traditional
double-buffering.
2021-06-15 10:33:18 -07:00
Kartik K. Agaram 0dda332ce3 .
Roll back to commit 70919b45f0. Recent commits add lots of extra function
args for dubious benefit.
2021-06-12 21:11:22 -07:00
Kartik K. Agaram 82fdf176c1 snapshot
Looks like what's slowing down screen rendering is in fact _font_ rendering.
2021-06-12 21:11:03 -07:00
Kartik K. Agaram b3869987da make fake screens more realistic
The real screen silently clips coordinates out of bounds.
2021-06-06 22:52:59 -07:00
Kartik K. Agaram 1eb74e2d5d shell: scrolling the trace 2021-05-29 20:52:57 -07:00
Kartik K. Agaram fd57c48c60 start double-buffering
Amazing how much difference it makes even when the implementation is so
naive and slow.
2021-05-18 10:23:54 -07:00
Kartik K. Agaram d604e68c2b . 2021-04-21 00:17:22 -07:00
Kartik K. Agaram 34596b6ee9 reimplement pixel graphics
Before: we always drew pixels atop characters, and we only drew pixels
that were explicitly requested.

After: we always draw pixels atop characters, and we only draw pixels that
don't have color 0.

Both semantics should be identical as long as pixels are never drawn atop
characters.
2021-04-19 21:05:57 -07:00
Kartik K. Agaram c22874a97f . 2021-04-19 10:47:30 -07:00
Kartik K. Agaram 8e38b86ab0 add some checks
Even if they duplicate lower-level ones, we have an opportunity for better
error messages. Any time I see a hard-to-debug error message, I should
be asking myself, "what higher-level primitive should catch and improve
this error?"
2021-04-19 10:47:30 -07:00
Kartik K. Agaram f5ece0451b start cleaning up pixel graphics
Filling pixels isn't a rare corner case. I'm going to switch to a dense
rather than sparse representation for pixels, but callers will have to
explicitly request the additional memory.
2021-04-19 10:47:30 -07:00
Kartik K. Agaram 53b56c67a9 Revert "allow drawing all pixels"
It causes us to run out of memory during tests.
2021-04-18 23:25:26 -07:00
Kartik K. Agaram 1c7799486d allow drawing all pixels
So far we aren't running out of memory. Might as well loosen our belts.
2021-04-17 22:37:29 -07:00
Kartik K. Agaram df9c71eff0 shell: horline working now
And we give a high-level error when the pixel buffer fills up.
2021-04-15 23:09:13 -07:00
Kartik K. Agaram f485bed515 shell: don't lose pixel graphics when moving cursor 2021-04-14 20:34:56 -07:00
Kartik K. Agaram bbabe8bd1a shell: pixel graphics 2021-04-13 22:27:59 -07:00