CodeBase - CHECKFONT - Does Font Exist On System?

Return to the CodeBase listing

Category: Text

Version: 1.0

0
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(&quot;Copperplate Gothic Bold&quot;)<br /> DISF$= &quot;Copperplate Gothic Bold&quot;<br /> Else<br /> If CHECKFONT(&quot;Mechanical&quot;)<br /> DISF$= &quot;Mechanical&quot;<br /> Else<br /> If CHECKFONT(&quot;Blacksmith&quot;)<br /> DISF$= &quot;Blacksmith&quot;<br /> Else<br /> If CHECKFONT(&quot;Rockwell Extra Bold&quot;)<br /> DISF$= &quot;Rockwell Extra Bold&quot;<br /> Else<br /> If CHECKFONT(&quot;Tahoma&quot;)<br /> DISF$= &quot;Tahoma&quot;<br /> Else<br /> If CHECKFONT(&quot;Verdana&quot;)<br /> DISF$= &quot;Verdana&quot;<br /> Else<br /> If CHECKFONT(&quot;Arial&quot;)<br /> DISF$= &quot;Arial&quot;<br /> Else<br /> If CHECKFONT(&quot;Times New Roman&quot;)<br /> DISF$= &quot;Times New Roman&quot;<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.