Yeah we draw some kind of UI maybe

This commit is contained in:
Jarkko Toivanen 2025-01-17 03:02:50 +02:00
commit 01a02c98ba
Signed by: jt
GPG key ID: 9151B109B73ECAD5
4 changed files with 48 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
kaari

4
Makefile Normal file
View file

@ -0,0 +1,4 @@
build: main.c
tcc -o kaari main.c
run: main.c
tcc -run main.c

10
README.md Normal file
View file

@ -0,0 +1,10 @@
Kaari
=====
For editing a binary format font. Made in C.
Building
--------
I guess I am using TCC to build this project.
Should be able to use about any C compiler tbh.

33
main.c Normal file
View file

@ -0,0 +1,33 @@
#include<stdio.h>
#define clear() printf("\033[H\033[J")
#define gotoxy(x,y) printf("\033[%d;%dH", (y), (x))
void drawWin(int fontH);
int main() {
clear();
drawWin(12);
return 0;
}
void drawWin(int fontH) {
clear();
printf("Kaari - Binarier font editor\r\n");
printf("+--------+\r\n");
int cstart=32;
int cperline=16;
int cmax=126;
for (int y=0; y<fontH; y++) {
printf("| | ");
for (int c=y*cperline+cstart; c<(y+1)*cperline+cstart && c<=cmax; c++) {
printf("%c ", c);
}
printf("\r\n");
}
printf("+--------+\r\n");
return;
}