diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-08-28 20:56:15 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-08-28 21:11:45 -0700 |
commit | 79e2569f1a842370edb29de070da63d0d217396d (patch) | |
tree | 6b095502d692d72deeace4426fea113fa5a39ab5 /103grapheme.subx | |
parent | 2c87cd2f34ece94aae936e563bdbf360deef4e9b (diff) | |
download | mu-79e2569f1a842370edb29de070da63d0d217396d.tar.gz |
font data structure now supports 16-bit glyphs
We can't yet render the latter 8 bits.
Diffstat (limited to '103grapheme.subx')
-rw-r--r-- | 103grapheme.subx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/103grapheme.subx b/103grapheme.subx index c5615430..fa3b17d4 100644 --- a/103grapheme.subx +++ b/103grapheme.subx @@ -2,10 +2,6 @@ # # We need to do this in machine code because Mu doesn't have global variables # yet (for the start of the font). -# -# There are uncomfortable assumptions baked in here about english/latin -# script. We convert the grid of pixels into a fixed-width grid of graphemes, -# which may not work well with other language families. == code @@ -90,8 +86,9 @@ draw-grapheme-on-screen-buffer: # buffer: (addr byte), g: grapheme, x: int, y: 81 7/subop/compare %esi 0x80/imm32 0f 8d/jump-if->= $draw-grapheme-on-screen-buffer:end/disp32 # var letter-bitmap/esi = font[g] - c1 4/subop/shift-left %esi 4/imm8 + 69/multiply %esi 0x21/imm32/glyph-size 6/r32/esi 81 0/subop/add %esi Font/imm32 + 46/increment-esi # skip size # var ycurr/edx: int = y*16 8b/-> *(ebp+0x14) 2/r32/edx c1 4/subop/shift-left %edx 4/imm8 |