summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bin/fbclock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/fbclock.c b/bin/fbclock.c
index 4576d33b..d35369ca 100644
--- a/bin/fbclock.c
+++ b/bin/fbclock.c
@@ -108,9 +108,11 @@ int main(int argc, char *argv[]) {
             for (char *s = str; *s; ++s) {
                 uint8_t *glyph = glyphs[(uint8_t)*s];
                 for (uint32_t y = 0; y < header.glyphHeight; ++y) {
+                    uint32_t stride = header.glyphSize / header.glyphHeight;
                     for (uint32_t x = 0; x < header.glyphWidth; ++x) {
-                        uint8_t b = glyph[y] >> (header.glyphWidth - x) & 1;
-                        buf[y * info.xres + left + x] = b ? FG : BG;
+                        uint8_t bits = glyph[y * stride + x / 8];
+                        uint8_t bit = bits >> (7 - x % 8) & 1;
+                        buf[y * info.xres + left + x] = bit ? FG : BG;
                     }
                 }
                 left += header.glyphWidth;
lens for a bodyJune McEnroe 2024-09-19Add photos from September 5June McEnroe 2024-09-15Add some more film stocks to the listJune McEnroe 2024-09-13Add photos from September 2June McEnroe 2024-09-13Add Fomapan 200 to films listJune McEnroe 2024-09-10Add August 29 picnic photosJune McEnroe 2024-09-08Apply some bold to trips renderingJune McEnroe 2024-09-08Render trips hopefully more efficientlyJune McEnroe 2024-09-08Allow removing bodies and lensesJune McEnroe 2024-09-08Limit body width so it looks less silly on desktopJune McEnroe 2024-09-07Handle no film being loadedJune McEnroe 2024-09-07Fancy up the text a littleJune McEnroe