Load Font directly from Font-File?
-
Hi. Is it possible to load a font directly from a font-file (*.ttf etc in an ordinary path) without registring the file in the system font tables (registry etc)? thanks for the help, and good luck for your own projects
-
Hi. Is it possible to load a font directly from a font-file (*.ttf etc in an ordinary path) without registring the file in the system font tables (registry etc)? thanks for the help, and good luck for your own projects
see CreateScalableFontResource, AddFontResource, RemoveFontResource etc.. Cleek | Image Toolkits | Thumbnail maker
-
Hi. Is it possible to load a font directly from a font-file (*.ttf etc in an ordinary path) without registring the file in the system font tables (registry etc)? thanks for the help, and good luck for your own projects
Thanks Chris but see -Font files must be in the SYSTEM subdirectory of the WINDOWS directory to be used by the AddFontResource function. -The CreateScalableFontResource function is used to install TrueType fonts -The EnumFontFamiliesEx function enumerates all fonts in the system that match the font characteristics.. I want to load a Font directly for a *.ttf or *.fon file. This file can be everywhere ( CD..) Never the less thank you very much for trying to help me
-
Thanks Chris but see -Font files must be in the SYSTEM subdirectory of the WINDOWS directory to be used by the AddFontResource function. -The CreateScalableFontResource function is used to install TrueType fonts -The EnumFontFamiliesEx function enumerates all fonts in the system that match the font characteristics.. I want to load a Font directly for a *.ttf or *.fon file. This file can be everywhere ( CD..) Never the less thank you very much for trying to help me
AskQuestion wrote:
-Font files must be in the SYSTEM subdirectory of the WINDOWS directory to be used by the AddFontResource function.
So just copy the .fon or .ttf file(s) to the Fonts folder before calling
AddFontResource()
.
"Take only what you need and leave the land as you found it." - Native American Proverb
-
Thanks Chris but see -Font files must be in the SYSTEM subdirectory of the WINDOWS directory to be used by the AddFontResource function. -The CreateScalableFontResource function is used to install TrueType fonts -The EnumFontFamiliesEx function enumerates all fonts in the system that match the font characteristics.. I want to load a Font directly for a *.ttf or *.fon file. This file can be everywhere ( CD..) Never the less thank you very much for trying to help me
i don't know about .FON files, but for a .TTF file, see this Google thread[^] Cleek | Image Toolkits | Thumbnail maker
-
i don't know about .FON files, but for a .TTF file, see this Google thread[^] Cleek | Image Toolkits | Thumbnail maker
thx Chris it took a while to understand, since the help in msn isn't correct.:) AddFontResource.. really worked. thx again, you really have been a great help