home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l210 / 1.ddi / EXAMPLES.ARC / CH17EX05.PRO < prev    next >
Encoding:
Text File  |  1988-06-21  |  1.7 KB  |  56 lines

  1. /*
  2.    Turbo Prolog 2.0 Chapter 17, Example Program 5
  3.    
  4.    Copyright (c) 1986, 88 by Borland International, Inc
  5.    
  6. */
  7. constants
  8. % To access your BGI drivers and fonts bgi_path may need to equal "..\\BGI".
  9.    bgi_path = ""
  10.  
  11. % To access the GRAPDECL.PRO file you may need to add a path: 
  12. % include "..\\programs\\GRAPDECL.PRO" 
  13. include "GRAPDECL.PRO" 
  14.  
  15. goal
  16.    initgraph(detect,0,GraphDriver,GraphMode,bgi_path),
  17.    Title = "Font Example",
  18.    setTextJustify(center_Text,center_Text),
  19.    setUserCharSize(1,1,1,1),
  20.    setTextStyle(triplex_Font,horiz_Dir, user_Char_Size),
  21.    textWidth(Title,Width), textHeight(Title,Hight),
  22.    setUserCharSize(200,Width,100,Hight),
  23.    setTextStyle(triplex_Font,horiz_Dir, user_Char_Size),
  24.    rectangle(0,0,200,100),
  25.    outtextxy(100,48,Title),
  26.  
  27.    setUserCharSize(300,Width,100,Hight),
  28.    setTextStyle(gothic_Font,horiz_Dir, user_Char_Size),
  29.    rectangle(220,0,520,100),
  30.    outtextxy(370,48,Title),
  31.  
  32.    /*  Vertical Sans-Serif Font */
  33.    setUserCharSize(200,Width,150,Hight),
  34.    setTextStyle(sans_Serif_Font,vert_Dir, user_Char_Size),
  35.    rectangle(100,110,240,300),
  36.    outtextxy(150,200,Title),
  37.  
  38.    setTextJustify(left_Text,center_Text),
  39.    setTextStyle(small_Font,horiz_Dir, 1),
  40.    outtextxy(380,200,"Press Key to exit"),
  41.  
  42.    setTextJustify(right_Text,center_Text),
  43.    setTextStyle(small_Font,horiz_Dir, 4),
  44.    outtextxy(380,208,"Press Key to exit"),
  45.  
  46.    setTextJustify(left_Text,center_Text),
  47.    setTextStyle(small_Font,horiz_Dir, 6),
  48.    outtextxy(380,220,"Press Key to exit"),
  49.  
  50.    setTextJustify(center_Text,center_Text),
  51.    setTextStyle(default_Font,horiz_Dir, 2),
  52.    outtextxy(380,240,"Press Key to exit"),
  53.  
  54.    readchar(_),
  55.    closegraph.
  56.