computer help index
 
 
Search:
"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,240 tips!

Windows 2000 and DOS

Quickly Preview a Font

SUMMARY: This batch file can help you preview your Windows 2000 font collection.
 
To quickly preview a font with Windows 2000, you can type in the following command:

fontview FONT_FILENAME

For example, to preview the Arial font, type in:

fontview c:\winnt\fonts\arial.ttf

Note that this requires typing in the full path to the font, as well as its .ttf or .fon file extension.

This is rather inconvenient. Thus, the following DOS batch file, font.bat, can be placed in your Windows directory. Copy this all on one line:

@if exist c:\winnt\fonts\%1.fon (fontview c:\winnt\fonts\%1.fon) else if exist c:\winnt\fonts\%1.ttf (fontview c:\winnt\fonts\%1.ttf) else (echo No font found & pause)

Now, from a batch file, command prompt, or from the "Start" - "Run" command, you can type in the following:

font SHORT_FONT_NAME

If SHORT_FONT_NAME.fon exists, it will be previewed. Else, if SHORT_FONT_NAME.ttf exists, it will be previewed. Else, you will be prompted with "No font found" and asked to press ENTER to continue. This way, the DOS window will stay open if you execute this batch file from the "Start" - "Run" command.

For example, the following command will preview the Arial font, a TrueType font:

font arial

If you have a "Small Fonts" font file installed as smallf.fon, the following will preview it:

font script

If you try previewing an invalid font, such as "HelloWorld", you will get the following (the below shows what would happen from the Windows 2000 DOS command prompt):

C:\>font helloworld
No font found
Press any key to continue . . .


 
Add: Del.icio.us | Digg | Furl | My Yahoo!
 
Discuss This Tip

Print This Tip

Get E-Mail When New Tips are Online

Return to the Windows 2000 and DOS page.

RSS Feeds - Subscribe!
 

You want the latest tech tips and tricks in your e-mail Inbox - FREE? Type your e-mail address below and click 'Subscribe'.
 



( sample / details ) ( opt-out instructions )
 


 Free Offer! - Subscribe to the MalekTips computer help list and be one of the first to get new computer tips, articles, and download links! ( privacy policy )  ( opt-out instructions )
This page and its contents are copyright
©1997 - 2008 Envision Programming. ( copyright/disclaimer )

Home | Free Computer Help Newsletter! | Windows | Web Development | DOS and Batch Files | Removing Spyware
Digital Camera and Photography | Computer and Internet | Software | Microsoft Word
Computer Articles | About | Contribute a Tip | Link To Us! | Computer and Technology Links
RSS Feeds |  Contact Us | Advertising | Privacy Policy | Computer Help Forums