{$MODE objfpc}
uses tools,vipgfx,myTTF;
var
   myFontAA:ttfFont;
   i,x,y:longint;
   s:string;
   ch:char;
   ss:string;
begin
writeln('loading font...');

initTTF;

  ttfCreateFont('../arial.ttf',64,myFontAA);


initGFXsystem(800,600,false);


s:='4365436';

repeat

        fastfill(vscreen.data,vscreen.width*vscreen.height,$ffff0000);

        

      //  if visKeyPressed then ;


        s:=s+visReadKey;
    
        if keyboard[KEY_LSHIFT] then ttfPrintStringXY(vscreen,myFontAA,64,32,RGBA(255,255,255,255),'lshift');


        //ttfGetStringSize(myFontAA,s,x,y);

        ttfPrintStringXY(vscreen,myFontAA,64,100,RGBA(0,0,255,255),s);
        //drawrectangle(vscreen,100,100,100+x,100+y,$ffffffff);


    updateGFXsystem;

  until gfxDone or keyboard[KEY_ESCAPE];


 ttfCloseFont(myFontAA);

CloseTTF;
 finishGFXsystem;

 ReturnFPSstring;

end.
