Yeah we draw some kind of UI maybe
This commit is contained in:
commit
01a02c98ba
4 changed files with 48 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
kaari
|
4
Makefile
Normal file
4
Makefile
Normal 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
10
README.md
Normal 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
33
main.c
Normal 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;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue