getfontasl.pas 1019 B

1234567891011121314151617181920212223242526272829303132
  1. PROGRAM GetFontAsltest;
  2. uses easyasl,amsgbox,amigautils;
  3. {
  4. An example to get a font with easyasl.
  5. 24 Jan 2000.
  6. [email protected]
  7. }
  8. VAR
  9. myfont : tFPCFontInfo;
  10. dummy : BOOLEAN;
  11. BEGIN
  12. dummy := GetFontAsl('Pick a font',myfont,NIL);
  13. IF dummy THEN BEGIN
  14. MessageBox('FPC Pascal Request',
  15. 'You picked as font :' + myfont.nfi_Name + #10 +
  16. 'The fontsize is :' + longtostr(myfont.nfi_Size) + #10 +
  17. 'The fontstyle is :' + longtostr(myfont.nfi_Style) + #10 +
  18. 'The flags are set to :' + longtostr(myfont.nfi_Flags) + #10 +
  19. 'Frontpen is number :' + longtostr(myfont.nfi_FrontPen) + #10 +
  20. 'And as the backpen :' + longtostr(myfont.nfi_BackPen) + #10 +
  21. 'And finally drawmode :' + longtostr(myfont.nfi_DrawMode),
  22. 'Nice font!');
  23. END ELSE
  24. MessageBox('FPC Pascal request','You didn''t pick a font','Why not?');
  25. END.