Platform SDK: Windows GDI Font Installation and DeletionTo temporarily install a font, call AddFontResource or AddFontResourceEx. These functions load a font that is stored in a font-resource file. However, this is a temporary installation because after a reboot the font will not be present. In the case of TrueType and OpenType fonts, an additional step is sometimes necessary before the font can be installed in the font table. Some font manufacturers ship only the TrueType or OpenType font-data files (identified by the .ttf extension). Before The system can load these fonts, it requires a corresponding header file (identified by the .fot extension). To create this header file, an application must call the CreateScalableFontResource function and pass the name of the font-data file as the third parameter. When this header file is created, an application can install the font by calling the AddFontResource or AddFontResourceEx function and passing the name of the new header file. For an application that installs TrueType fonts, see the Font Installation SDK at http://fontweb/tools/install/.When an application finishes using an installed font, it must remove that font by calling the RemoveFontResource function. Whenever an application calls the functions that add and delete font resources, it should also call the SendMessage function and send a WM_FONTCHANGE message to all top-level windows in the system. This message notifies other applications that the internal font table has been altered by an application that added or removed a font.
Font Installation and DeletionTo temporarily install a font, call AddFontResource or AddFontResourceEx. These functions load a font that is stored in a font-resource file. However, this is a temporary installation because after a reboot the font will not be present.
In the case of TrueType and OpenType fonts, an additional step is sometimes necessary before the font can be installed in the font table. Some font manufacturers ship only the TrueType or OpenType font-data files (identified by the .ttf extension). Before The system can load these fonts, it requires a corresponding header file (identified by the .fot extension). To create this header file, an application must call the CreateScalableFontResource function and pass the name of the font-data file as the third parameter. When this header file is created, an application can install the font by calling the AddFontResource or AddFontResourceEx function and passing the name of the new header file. For an application that installs TrueType fonts, see the Font Installation SDK at http://fontweb/tools/install/.When an application finishes using an installed font, it must remove that font by calling the RemoveFontResource function. Whenever an application calls the functions that add and delete font resources, it should also call the SendMessage function and send a WM_FONTCHANGE message to all top-level windows in the system. This message notifies other applications that the internal font table has been altered by an application that added or removed a font.
<<delphi深度历险>>也有详细的例子可用