Hack 15 Sample Your System Fonts![]() ![]() than 100 fonts. How do you choose the right one? If you rely on simple trial and error, you'll quickly find yourself frustrated. Instead, use this hack to get a sample of every available font.They say there's no accounting for taste, and that's certainly true about fonts. With hundreds of fonts coming preinstalled on most computers, and thousands more available for purchase online, there's something for everybody.The tried-and-true method of choosing a font in Word is to select some text and then scroll through the Font pull-down menu on the Formatting toolbar until something strikes your fancy. But when you can see only about a dozen fonts at a time, as in Figure 3-4, it's hard to compare all your options. Figure 3-4. It's difficult to compare over 100 fonts when you can see only 12 at a time![]() it's not part of the main menu bar by default. To view it, select Tools select "Built-in Menus" from the Categories list. In the Commands section, select the Font menu and drag it to your main menu bar.You can scroll through the font menu as described above, but a more efficient, more organized, and more fruitful method of comparing your fonts would be to generate a table of some sample text, formatted in each of the available fonts on your system.This hack creates a new document containing a two-column table with a row for each available font. The first column lists the font's name, and the second column provides some sample formatted text. The macro sorts the font names alphabetically. A portion of the results is shown in Figure 3-5. Figure 3-5. Font sampler output![]() a few moments to run. 3.3.1 The CodeThe new document this macro creates will be based on the Normal template, and the font names will be displayed in Times, a standard font nearly guaranteed to be on any computer.Put the following code in the template of your choice [Hack #50] : Sub FontSampleTable( )To help speed things along, this macro takes advantage of Word's ScreenUpdating property. If you set it to False at the start of the macro, Word will not waste valuable CPU resources constantly redrawing the display. While screen updating will automatically resume once the macro finishes, it's considered good form to explicitly restore it at the end of your code.Because this macro may take a few minutes to run on a computer with a lot of fonts installed, you can use the StatusBar property to report on the code's progress [Hack #65] . The status bar provides meaningful user feedback, particularly if the macro takes time to run. Setting the ScreenUpdating property to False will not affect the status bar. 3.3.2 Hacking the HackWith a few modifications, the generated table can use selected text instead of arbitrary sample characters. This trick is especially useful if your text contains symbols or special characters that may not be defined in certain typefaces, as in the case of the Harrington font, shown in Figure 3-6. Figure 3-6. Seeing samples of special characters can help you narrow the choices among fonts on your system![]() FontSampleTable macro shown above. With this version, the macro uses the currently selected text as the sample text for each font. If you select more than one paragraph, it uses only the text in the first paragraph. Sub FontSamplesUsingSelection( ) |