Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
Зарегистрировать шрифт
|
|||
|---|---|---|---|
|
#18+
Как можно программно зарегистрировать в Windows шрифт, предварительно скопированный в каталог Fonts? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 17.11.2003, 10:50 |
|
||
|
Зарегистрировать шрифт
|
|||
|---|---|---|---|
|
#18+
Installing Fonts By carrying out these steps, you can write a single font installation routine that works for both Windows NT/Windows 2000 and Windows 95/98: Determine whether the platform is Windows 95/98 or Windows NT/Windows 2000. This distinction is important because Windows 95/98 allows a shared network installation where most system files, including fonts, are stored on a centrally managed server. To determine the platform, look in the following registry location for a "SharedDir" value. HKeyLocalMachine\Software\Microsoft\Windows\CurrentVersion\Setup The data value of "SharedDir" is the UNC name of the server and sharepoint of the shared directory. In most cases, a shared directory is marked as read-only by the system administrator, so your installation program should also check to see if it can write to this location. If it cannot, it should let the user install the fonts in a different location, or stop the setup process. Check whether the TrueType® font being installed is already present on the system by using the EnumFontFamilies function. If that font is present, the program should check to see if its version is newer by matching the installed font name with the filename on the disk. For Windows 95/98, the font name is stored in the following registry location. HKeyLocalMachine\Software\Microsoft\Windows\CurrentVersion\Fonts For Windows NT/Windows 2000, the font name is stored in the following registry location. HKeyLocalMachine\Software\Microsoft\Windows NT\CurrentVersion\Fonts The subkeys in this registry location contain the full name of the font file as the value key, followed by the filename of the .TTF file as the key data. If the filename in the registry is just a filename with no path information, the font is installed in the \WINDOWS\FONTS directory for Windows 95/98 or the \WINDOWS\SYSTEM directory for Windows NT/Windows 2000. Because TrueType font files do not carry a version resource, your program will need to retrieve the version string from the 'name' table in the .TTF file. Before copying the .TTF file to the appropriate directory, the installation program should check to see if the filename already exists in that directory. If it does, the program should rename your .TTF file to some other name, perhaps by appending a number to the end of the basename. After copying the .TTF file to the user's disk, the installation program should inform the system that it wants the font to be available. The program should pass it the .TTF filename directly by using the AddFontResource function. Windows 95/98 and Windows NT/Windows 2000 do not require the creation of .FOT files. To make the font installation permanent, the installation program should add the font name and filename to the registry by writing both of the values to the following registry location. HKeyLocalMachine\Software\Microsoft\Windows\CurrentVersion\Fonts ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 18.11.2003, 07:46 |
|
||
|
Зарегистрировать шрифт
|
|||
|---|---|---|---|
|
#18+
Спасибо. В другом форуме мне подсказали другой вариант: Что-бы установить шрифт воспользуюся API: DECL INTEGER AddFontResource IN GDI32 STRING =AddFontResource('C:\MyFont.ttf') ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 19.11.2003, 08:38 |
|
||
|
Зарегистрировать шрифт
|
|||
|---|---|---|---|
|
#18+
Посмотрите внимательно, я тоже AddFontResource упоминаю))) Просто после перезагрузки шрифт пропадет, если не прописать его в реестре. Хотя, возможно, вам и не нужна перманентная регистрация) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.11.2003, 08:26 |
|
||
|
Зарегистрировать шрифт
|
|||
|---|---|---|---|
|
#18+
Извиняюсь, я невнимательно все прочитал, заметил, что речь идет об этой-же функции уже после того, как нажал кнопку опубликовать. Пока некогда, я не проверял, но у меня даже мысли не возникло, что указанная функция не выполнит регистрации в реестре. Тогда, конечно, придется прописать и это, или регистрировать шрифт при каждом запуске программы. Спасибо за отклик. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 21.11.2003, 10:49 |
|
||
|
|

start [/forum/topic.php?fid=16&fpage=227&tid=1348647]: |
0ms |
get settings: |
10ms |
get forum list: |
20ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
89ms |
get topic data: |
16ms |
get forum data: |
3ms |
get page messages: |
93ms |
get tp. blocked users: |
2ms |
| others: | 12ms |
| total: | 253ms |

| 0 / 0 |
