|
|
我最近在编程序时遇到一个比较奇怪的问题,是我用opengl的函数wglUseFontOutline()这个函数输出文本时改变不了它的字体大小呀,fontHeight改变多少输出的文字大小都是一样的,而我用wglUseFontBitmap()这个函数却可以通过改变fontHeight改变字体的大小,请问有人知道其中的原因吗?难道是wglUseFontOutline()有什么限制?急。。。。请那位高手指点小弟一下吧
HFONT font; // Windows Font ID
base = glGenLists(256); // Storage For 256 Characters
/* font = CreateFont( fontHeight, // Height Of Font
0, // Width Of Font
0, // Angle Of Escapement
0, // Orientation Angle
FW_BOLD, // Font Weight
FALSE, // Italic
FALSE, // Underline
FALSE, // Strikeout
ANSI_CHARSET, // Character Set Identifier
OUT_TT_PRECIS, // Output Precision
CLIP_DEFAULT_PRECIS, // Clipping Precision
ANTIALIASED_QUALITY, // Output Quality
FF_DONTCARE|DEFAULT_PITCH, // Family And Pitch
"Arial"); // Font Name*/
font=CreateFontIndirect(&logfont);
SelectObject(m_pDC->GetSafeHdc(), font); // Selects The Font We Created
wglUseFontOutlines( m_pDC->GetSafeHdc(), // Select The Current DC
0, // Starting Character
256, // Number Of Display Lists To Build
base, // Starting Display Lists
0.0f, // Deviation From The True Outlines
0.2f, // Font Thickness In The Z Direction
WGL_FONT_POLYGONS, // Use Polygons, Not Lines
gmf); // Address Of Buffer To Recieve Data
我最近在编程序时遇到一个比较奇怪的问题,是我用opengl的函数wglUseFontOutline()这个函数输出文本时改变不了它的字体大小呀,fontHeight改变多少输出的文字大小都是一样的,而我用wglUseFontBitmap()这个函数却可以通过改变fontHeight改变字体的大小,请问有人知道其中的原因吗?难道是wglUseFontOutline()有什么限制?急。。。。请那位高手指点小弟一下吧 |
|