От: | trophim | ||
Дата: | 05.01.08 20:50 | ||
Оценка: |
To 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.
To install a font that will remain after the system is rebooted, use one of the following methods:
Go to the Control Panel, click the Fonts icon, and select Install New Fonts from the File menu. The font is available to an application even before the reboot. However, in a terminal server situation the font is available for the current session but is not available for other sessions until after a reboot.
Copy the font into the %windir%\fonts folder. Then, either go to the Control Panel and click the Fonts icon, or call AddFontResource or AddFontResourceEx. The font is available to an application even before the reboot. However, in a terminal server situation the font is available for the current session but is not available for other sessions until after a reboot. If you only copy the font into the %windir%\fonts folder, the font will be available only after the system is rebooted.
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.