ListFont 1.2a
(C) 1997 - 2000 by H. Eichmann
All rights reserved

ListFont is freeware. You can copy and use it as you wish as long as you do not modify it.

Purpose:
ListFont shows all fonts installed on a computer and displays the font characters using three different output strategies.
Its main use is for developers to quickly see which characters are availible in which font.

Usage:
On the left side the NAMES of all installed fonts are displayed. By changing the 'Character Set' field only fonts containing characters of this set are shown.
On the left of each font name is a small button for expanding the information about this font. By pressing it all 'Scripts' (which are more or less the character set names) are displayed.
By expanding a script all 'Styles' availible for this script are shown.
Whenever a font is choosen, its full name is displayed under the character set field. Below this all 224 charcters between a byte value of 32 and 255 are shown in a listox.
With the two option buttons 'SetText' and 'TextOut' the output method can be selected. The appearence of the font can change (at least on my Windows NT if a non-default script is choosen)!
'Load Font ...' adds a font file temporary to the font list.
Finally the 'Show Unicode Font' opens a new window showing all 65536 characters availible for unicode applications using this font.

Limitations:
ListFont is a 'Quick And Very Dirty' program. I did not spent much time writing it.
On some fonts (f.e. symbol) the numbers on the left are cryptic symbols if the output is generated via SetText. This is by design.

Internal details (for software developers):
There are no secrets in this program. Its all from the book:
For the list of fonts EnumFontFamiliesExA is used three times:
In the first call all members of the LOGFONT structure are set to 0 except lfCharSet, which contains the choosen character set or DEFAULT_CHARSET. Within the callback function, the elfLogFont.lfFaceName members of ENUMLOGFONTEX are displayed as the root entries of the tree view.
From within this callback function EnumFontFamiliesExA is called a second time. Again all members of LOGFONT are set to 0 except lfCharSet and lfFaceName, which are copied from the previous ENUMLOGFONTEX structure. The second callback function displayes the elfScript member as the first-level leave in the tree view.
From within this callback function EnumFontFamiliesExA is called a third time. Now all members of the LOGFONT structure are copied from the previous ENUMLOGFONTEX structure. The third callback function displayed the elfStyle member as the second-level leave in the tree view.
Note that the second and third call can give the wanted tree view entries more than once!
If a font is selected, the static text below the 'Character Set' field receives the following ENUMLOGFONTEX members: elfFullName (elfScript, elfStyle). Furthermore the listbox is erased and filled with a new font sample.
Actually there are two list boxes: one containing strings and another with the 'LBS_OWNERDRAWFIXED' style. By choosing 'TextOut' or 'SetText' one of them is hidden and the other is shown. In one of them the text is displayed by using the WM_SETFONT and LB_ADDSTRING messages. In the other TextOutA is used.
'Load Font ...' adds the selected file via AddFontResource and enumerates all fonts (just the first pass) in order to determine the face name of the added font. Then the whole procedure of filling the tree view is repeated and the new style selected. If another font is loaded or the program terminates the loaded font is removed via RemoveFontResource.
By pressing 'Show Unicode Font' a new window appears. It is not a modeless dialog but a new window created and handled by a second thread. The output is done here using TextOutW. For all three output methods the font is created using CreateFontIndirectA using the LOGFONT delivered by the EnumFontFamiliesEx calls.

Author
If you have questions or comments: feel free to contact me under h.eichmann@gmx.de