This tip was printed from the MalekTips Computer and Technology Help and Tips website at http://malektips.com.

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 . . .


 

 

Press the "print" button on your browser or select "File" - "Print" to print this tip. Then, return to Windows 2000 and DOS - Quickly Preview a Font

Standard disclaimer applies - read http://malektips.com/disclaim.html