I am trying to make a font using the LOGFONT structure. This is my function:
The problem is that I always get an Arial font! For example:Code:void NFont(char* FontName, UINT size, bool bold, bool italic, bool underline, bool strikethrough) { if (abs(size)>72) size = 72; LOGFONT lg = { abs(size), //height 0, //width 0, //escapement 0, //orientation bold ? FW_BOLD : FW_NORMAL, italic, underline, strikethrough, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH, *FontName //"Comic Sans MS"}; ... ...
returns an Arial font. However, if i change the *FontName (the one in the LOGFONT list) to a font name f.e "Comic Sans MS", it works. I get the right font. What might be the solution??Code:NFont ("Comic Sans MS", true, false,false,false);



LinkBack URL
About LinkBacks


