Mit Direct3D9 und der Funktion "D3DXCreateFont" will ich einen 2D Font erstellen.
Das klappt zwar auch aber leider interessiert sich DX9 überhaupt nicht dafür, welche Schriftart ich nehmen will. Statt dessen nimmt DX9 immer die Schriftart "Arial" bzw. die erste die DX9 finden kann.
So sieht mein Code aus:
|
C-/C++-Quelltext
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
ID3DXFont* FontHandle;
std::string FontName = "Times new roman"; // Irgend eine Schriftart außer Arial
HRESULT Result = D3DXCreateFont(
pDirect3DDevice, // Direct3D9 device pointer
0, // Default font height
0, // Default font width
0, // No bold type
0, // No mipmap levels
FALSE, // No italic type
ANSI_CHARSET, // Normal ansi charset
OUT_TT_ONLY_PRECIS, // Output precision
ANTIALIASED_QUALITY, // Quality
FF_DONTCARE | DEFAULT_PITCH, // PitchAndFamily
FontName.c_str(), // !!! FontName (pFacename) zeigt keine Wirkung :-( !!!
&FontHandle // Output font handle
);
|
Kann mir einer sagen woran das liegt??