33 lines
566 B
C
33 lines
566 B
C
#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;
|
|
}
|