home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug120.arc / PASCAL.LBR / FONT.PZS / FONT.PAS
Pascal/Delphi Source File  |  1979-12-31  |  2KB  |  49 lines

  1. USING GRAPHIC WORDBEE FONT FILES WITH TURBO PASCAL
  2. by Glenn Satchell
  3.  
  4. Arσ yo⌡ sicδ oµ usinτ plaiε olΣ inversσ character≤ iε you≥ pasca∞ ì
  5. programs┐ FONT.FU╬ i≤ ß shor⌠ pasca∞ functioε whicΦ load≤ thσ PC╟ ì
  6. memor∙á froφ ß selecteΣ file«á Thi≤ filσ ma∙ bσ onσ oµ thσá font≤ ì
  7. createΣ usinτ thσ Graphiπ Wordbeσ Utilit∙ FONT.COM«á M∙ favouritσ ì
  8. i≤ ß runninτ writinτ font«
  9.  
  10. FONT.CO═á offer≤ jus⌠ abou⌠ thσ easies⌠ wa∙ oµ creatinτ ß specia∞ ì
  11. stylσá oµá letters¼á althougΦ file≤ ma∙ bσ createΣá usinτá Basic¼ ì
  12. Assembl∙á Language¼á Turb∩ Pascal¼á C¼á o≥ an∙ othσ program≤á yo⌡ ì
  13. like.
  14.  
  15. Thσ forma⌠ oµ thσ filσ i≤ simpl∙ 2δ oµ datß t∩ bσ loadeΣ int∩ thσ ì
  16. PC╟á memory«á Thσ functioε doe≤ no⌠ looδ fo≥ ß specia∞á beginninτ ì
  17. or end of file character.
  18.  
  19. Thσ functioε return≤ TRU┼ iµ therσ arσ n∩ errors¼á FALS┼ iµ therσ ì
  20. i≤ aε error. Typical usage might be:
  21.  
  22.   IF FONT('A:ESPERANT.FON') THEN LOWVIDEO;
  23.  
  24. Thσá cal∞á t∩ Lowvide∩ i≤ requireΣ t∩ switcΦ thσá outpu⌠á t∩á pcτ ì
  25. characters«
  26.  
  27. functioε fon⌠ (fontfilσ ║ str14⌐ ║ boolean;
  28. { You must include the following declaration in the main program:
  29.   TYPE STR14 = STRING[14]
  30. }
  31.  
  32. var
  33.     pcg : array[1..2048] of byte absolute $F800;
  34.     fn : file;
  35.     okay : boolean;
  36. begin
  37. okay:=true;
  38. assign(fn,fontfile);
  39. {$I-} reset(fn); {$I+}
  40. okay:=ioresult=0;
  41. if okay then
  42.     begin
  43.     {$I-} blockread(fn,pcg,16); {$I+}
  44.     okay:=ioresult=0;
  45.     end;
  46. close(fn);
  47. font:=okay
  48. end;
  49.