"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,820 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 . . .



 

Got something to add? Post a comment!

Everyone is invited to submit comments. Registered users also receive their own visitor profile page with a summary of recent posts.
Register | Login

Your name:
 E-mail:
* Home/Blog Page:
Comment:
(Max chars: 5000)

* = optional field

 


Print This Tip

Get E-Mail When New Tips are Online

Return to the Windows 2000 and DOS page.

 


New in MalekTips:

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 'Get Tips!'.
 


( sample / details )
( opt-out instructions )