kolibrios/programs/other/font_conv/convert.c
Kirill Lipatov (Leency) 49a893a157 corrected fonts
git-svn-id: svn://kolibrios.org@2226 a494cfbc-eb01-0410-851d-a64ba20cac60
2011-09-22 10:47:11 +00:00

49 lines
1.1 KiB
C

#include <stdio.h>
int main()
{
const int font_height = 9;
int font_width[2] = {5,7},
char_num,i,e;
char ch,data;
freopen("char.txt","rt",stdin);
freopen("CHAR.MT","wb",stdout);
for(char_num=256;char_num;char_num--)
{
fseek(stdin,8,SEEK_CUR);
for(e=font_height;e;e--)
{
data = 0;
for(i=0;i<font_width[0];i++)
{
data |= getchar()==' '?0:1<<i;
}
fseek(stdin,3,SEEK_CUR);
putchar(data);
}
}
freopen("char2.txt","rt",stdin);
freopen("CHAR2.MT","wb",stdout);
for(char_num=256;char_num;char_num--)
{
fseek(stdin,6,SEEK_CUR);
ch = getchar();
putchar(ch==' '?0x08:ch-47);
fseek(stdin,3,SEEK_CUR);
for(e=font_height;e;e--)
{
data = 0;
for(i=0;i<font_width[1];i++)
{
data |= getchar()==' '?0:1<<i;
}
putchar(data);
fseek(stdin,3,SEEK_CUR);
}
}
return 0;
}