summary refs log tree commit diff
path: root/bin/psfed.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-09-25 19:22:18 -0400
committerJune McEnroe <june@causal.agency>2018-09-25 19:22:18 -0400
commit1ff3d73ed3a5989a3d2e725263cab0a41f467f01 (patch)
tree03502c93ce6290e91f4793a4aecc7fdd62adab2a /bin/psfed.c
parentAdd psfed, a PSF2 font editor (diff)
downloadsrc-1ff3d73ed3a5989a3d2e725263cab0a41f467f01.tar.gz
src-1ff3d73ed3a5989a3d2e725263cab0a41f467f01.zip
Add r to psfed for invert
Diffstat (limited to 'bin/psfed.c')
-rw-r--r--bin/psfed.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/psfed.c b/bin/psfed.c
index ec80bd81..93e77002 100644
--- a/bin/psfed.c
+++ b/bin/psfed.c
@@ -337,6 +337,13 @@ static void inputEdit(char ch) {
 		break; case 'k': if (edit.y) edit.y--;
 		break; case 'j': if (edit.y + 1 < header.glyph.height) edit.y++;
 		break; case ' ': bitFlip(edit.index, edit.x, edit.y);
+		break; case 'r': {
+			for (uint32_t y = 0; y < header.glyph.height; ++y) {
+				for (uint32_t x = 0; x < header.glyph.width; ++x) {
+					bitFlip(edit.index, x, y);
+				}
+			}
+		}
 		break; case 'u': {
 			memcpy(glyph(edit.index), edit.undo, header.glyph.size);
 		}