c++ - Why my D3D9 Font is poor quality -
i have question. i'm trying draw on screen directx 9, reason all fonts (which use rounded edges) try use in poor quality, includes fonts downloaded internet, not know if i'm doing wrong, or if i'm paranoid it.
images:
my create font code:
d3dxcreatefont(pdevice, 30, 0, fw_bold, 1, 0, default_charset, out_default_precis, default_quality, default_pitch | ff_dontcare, "roboto", &pfont);
i've tried many things, like:
fw_bold fw_semibold default_quality antialiased_quality
but nothing has shown result.
my drawstring function:
void d3d9draw::string(int x, int y, dword flag, int fontid, d3dcolor color, std::string string, ...) { char buffer[256]; va_list args; va_start(args, string); vsprintf_s(buffer, string.c_str(), args); va_end(args); if (fontid >= (int)m_font.size()) fontid = 0; rect rect = { x, y, x, y }; m_font[fontid]->drawtext(null, buffer, -1, &rect, flag | dt_noclip, color); }
btw, sorry bad eng.
Comments
Post a Comment