diff options
author | bptato <nincsnevem662@gmail.com> | 2023-07-04 23:26:13 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-07-04 23:26:13 +0200 |
commit | a0ea4c5ac02c750e692a4bbbc3e2d4a6952641e3 (patch) | |
tree | d5fbf516531b8ed416576a4f943ccf79ac5175b4 /src/img | |
parent | b15cbe8fc079d34891f7d8553e12ce97e6ecc0c1 (diff) | |
download | chawan-a0ea4c5ac02c750e692a4bbbc3e2d4a6952641e3.tar.gz |
painter: fix off by one error in getCharBmp
Diffstat (limited to 'src/img')
-rw-r--r-- | src/img/painter.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/img/painter.nim b/src/img/painter.nim index 8296b744..d52aaff1 100644 --- a/src/img/painter.nim +++ b/src/img/painter.nim @@ -152,8 +152,8 @@ proc getCharBmp(u: uint32): Bitmap = if cu == u: return bmp # Unifont glyphs start at x: 32, y: 64, and are of 8x16/16x16 size - let gx = uint64(32 + 16 * (u mod 0xFF)) - let gy = uint64(64 + 16 * (u div 0xFF)) + let gx = uint64(32 + 16 * (u mod 0x100)) + let gy = uint64(64 + 16 * (u div 0x100)) var fullwidth = false const white = rgba(255, 255, 255, 255) block loop: |