home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / turbo5 / bgiexamp.arc / INSTFONT.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-08-29  |  614 b   |  25 lines

  1. { example for InstallUserFont }
  2.  
  3. uses
  4.   Graph;
  5. var
  6.   Driver, Mode : Integer;
  7.   TestFont : Integer;
  8. begin
  9.   TestFont := InstallUserFont('TEST');         { Install the font }
  10.   if GraphResult <> grOk then
  11.   begin
  12.     Writeln('Error installing TestFont (using DefaultFont)');
  13.     Readln;
  14.   end;
  15.   Driver := Detect;                            { Put in graphics mode }
  16.   Mode := 0;
  17.   InitGraph(Driver, Mode, '');
  18.   if GraphResult <> grOk then
  19.     Halt(1);
  20.   SetTextStyle(TestFont, HorizDir, 2);         { Use new font }
  21.   OutText('Installable fonts supported...');
  22.   Readln;
  23.   Closegraph;
  24. end.
  25.