CodeBase - CHECKFONT - Does Font Exist On System?
Return to the CodeBase listing
Category: Text
Version: 1.0
Information
Uploaded: 13th Mar 2007 08:48
Modified: 13th Mar 2007 08:51
Author: heartbone
Summary
Function CHECKFONT(FONT$) Returns 1 if input font is found on system, 0 if font is not found.
Full Description
You may assume that a particular font is present and you may be usually correct.<br /> However it's probably a good idea to check in programs designed for the general public.<br /> This function makes it easier for your programs to select different fonts.<br /> Here is a typical snippet using the CHECKFONT function.<br /> <br /> -------------------------<br /> <br /> Rem Use the first font found from this list:<br /> Rem 1) Copperplate Gothic Bold - 2) Mechanical - 3) Blacksmith - 4) Rockwell Extra Bold<br /> Rem 5) Tahoma - 6) Verdana - 7) Arial - 8) Times New Roman<br /> <br /> Rem Setup a default display font in case none are found!<br /> DISF$= Text Font$()<br /> <br /> If CHECKFONT("Copperplate Gothic Bold")<br /> DISF$= "Copperplate Gothic Bold"<br /> Else<br /> If CHECKFONT("Mechanical")<br /> DISF$= "Mechanical"<br /> Else<br /> If CHECKFONT("Blacksmith")<br /> DISF$= "Blacksmith"<br /> Else<br /> If CHECKFONT("Rockwell Extra Bold")<br /> DISF$= "Rockwell Extra Bold"<br /> Else<br /> If CHECKFONT("Tahoma")<br /> DISF$= "Tahoma"<br /> Else<br /> If CHECKFONT("Verdana")<br /> DISF$= "Verdana"<br /> Else<br /> If CHECKFONT("Arial")<br /> DISF$= "Arial"<br /> Else<br /> If CHECKFONT("Times New Roman")<br /> DISF$= "Times New Roman"<br /> Endif<br /> Endif<br /> Endif<br /> Endif<br /> Endif<br /> Endif<br /> Endif<br /> Endif<br /> <br /> Print DISF$<br /> Wait Key<br />
Comments
No comments yet.