Problem with D3DFont Aliasing [modified]
-
I am having a problem getting my D3DFonts to display antialiased. No matter what font I try to use, although some are better than others, it comes out all jagged around the edged like is is not being antialiased properly or at all. Font creation code:
if (FAILED(D3DXCreateFont(m_pDirect3D->GetDevice(), //D3D Device iSize, //Font height 0, //Font width iWeight, //Font Weight 0, //MipLevels bItalic, //Italic DEFAULT_CHARSET, //CharSet OUT_DEFAULT_PRECIS, //OutputPrecision ANTIALIASED_QUALITY, //Quality DEFAULT_PITCH|FF_DONTCARE, //PitchAndFamily stFace, //pFacename, &font.m_d3dFont))) //ppFont) { return -1; }
Font Display Code:m_pDirect3D->GetFontSprite()->Begin(D3DXSPRITE_ALPHABLEND); m_vFonts[state.m_nFont].m_d3dFont->DrawText(m_pDirect3D->GetFontSprite(), state.m_stText, -1, &rPos, state.m_dwTextJustify | DT_WORDBREAK, D3DCOLOR_RGBA(red,green,blue,iOpacity)); m_pDirect3D->GetFontSprite()->End();
I have tried drawing both with a Direct3D sprite and by setting the first parameter to NULL. Any help is always appreciated. Thanks, Dustin P.S. Here is a link to what it looks like : http://img238.imageshack.us/img238/4011/fontsamplecl4.jpg[^] -- modified at 12:54 Wednesday 20th December, 2006