uses font2, memory, crt, dos;



var
fw1,fw2:file;

c, i, x,y,n,m:word;
fr:file;
b:byte;
size:word;

begin
SetUpVirtual(scr,vaddr);
SetUpVirtual(scr2, vaddr2);
SetUpVirtual(scr3, vaddr3);

size:=(168+81+8+8)*16 +54;
{Load font to virtual buffer}
for n:=0 to 641*2-1 do mem[vaddr3:            n]       :=round(vertex[n]*1.5);
for n:=0 to 447*3-1 do memw[vaddr3+81:        n shl 1] :=faces[n]*2;
for n:=0 to 95 do      mem[vaddr3+168+81:     n]       :=ascii_index[n];
for n:=0 to 53 do      memw[vaddr3+168+81+8:  n shl 1] :=glyph_offset[n];
for n:=0 to 53 do      mem[vaddr3+168+81+8+8: n]       :=glyph_size[n];


Assign(fw1, 'font2.bin');
Rewrite(fw1,1);
Reset(fw1, 1);
for i:=0 to size-1 do BlockWrite(fw1, mem[vaddr3:i], 1);
Close(fw1);

WriteLn(Size, ' byte complete');
readkey;
repeat until keypressed;

end.