aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2020-07-26 00:10:26 +0200
committerMarvin Borner2020-07-26 00:10:26 +0200
commite946d9c56cf6f66dc277241f64614e5e05ca4ea0 (patch)
treec280aaa725dcfd069e846a5cc2d003aacce1de0b
parentc3dbbb2911b02c7d75f608f2d0d5a82864076df5 (diff)
I'm so confused right now...
I have to fix this tomorrow ig
-rw-r--r--src/features/psf.c8
-rw-r--r--src/main.c3
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) {
};