From e946d9c56cf6f66dc277241f64614e5e05ca4ea0 Mon Sep 17 00:00:00 2001
From: Marvin Borner
Date: Sun, 26 Jul 2020 00:10:26 +0200
Subject: I'm so confused right now...

I have to fix this tomorrow ig
---
 src/features/psf.c | 8 ++++----
 src/main.c         | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/features/psf.c b/src/features/psf.c
index ef63161..d830426 100644
--- a/src/features/psf.c
+++ b/src/features/psf.c
@@ -26,7 +26,7 @@ int psf_verify(char *data)
 void psf_test(char *chars, int height, int width, int char_size)
 {
 	char ch = 'a';
-	int x = 50;
+	int x = 0;
 	int y = 400;
 	const u32 c[3] = { 0xff, 0x00, 0x00 };
 
@@ -36,10 +36,10 @@ void psf_test(char *chars, int height, int width, int char_size)
 	char *draw = (char *)&fb[pos];
 	u16 row = 0;
 
-	for (int cy = 0; cy <= height; cy++) {
-		row = chars[ch * char_size + cy * ((width + 7) / 8)];
+	for (int cy = 0; cy < height; cy++) {
+		row = chars[ch * char_size + cy * (char_size / height)];
 
-		for (int cx = 0; cx <= width + 1; cx++) {
+		for (int cx = 0; cx < width; cx++) {
 			if (row & (1 << (width - 1))) {
 				draw[vbe_bpl * cx] = (char)c[2];
 				draw[vbe_bpl * cx + 1] = (char)c[1];
diff --git a/src/main.c b/src/main.c
index 4dee1fe..3fa8ffd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -29,7 +29,8 @@ void main(struct mem_info *mem_info, struct vid_info *vid_info)
 
 	ls_root();
 	/* psf_parse(read_file("/font/spleen-8x16.psfu")); */
-	psf_parse(read_file("/font/spleen-16x32.psfu"));
+	/* psf_parse(read_file("/font/spleen-16x32.psfu")); */
+	psf_parse(read_file("/font/spleen-12x24.psfu"));
 
 	while (1) {
 	};
-- 
cgit v1.2.3