Click to See Complete Forum and Search --> : CreateFont() with custom/uninstalled fonts?


Hnefi
January 14th, 2006, 06:55 AM
I'm using CreateFont() to build outline fonts in OpenGL. This is a practical enough solution, however the problem is that I cannot be sure that the typefont name which is given in the last parameter in the call to CreateFont() refers to the same font on the users machine as it does on mine.

Therefore, a neat solution would be if I could store a .ttf file of the font I want in the program directory and have CreateFont() look at that file instead. Is such a solution possible?

ovidiucucu
January 15th, 2006, 08:51 AM
Take a look at AddFontResource (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_9r51.asp) in MSDN.