This project has moved and is read-only. For the latest updates, please go here.


Improve font support


DXUT for Direct3D 9 and Direct3D 10 used D3DX for the ID3DXFont solution to render the UI and HUD. For DXUT11 in the DirectX SDK, the font support was no longer present in D3DX11.

Originally the suggestion was to use Direct2D/DirectWrite, but with the original Direct3D 11.0 Runtime it was only directly usable with Direct3D 10.1 interfaces. Use with Direct3D 11.0 interfaces was complex using shared surfaces, and was too heavy-weight for the simple needs of DXUT. Instead, a version of the Xbox 360 samples' team ATG font was pasted into DXUT11.

While this works, it does have limited support. Ideally DXUT11 could make use of either of the following, possibly with compilation defines:
  • Direct2D/DirectWrite via Direct3D 11.1 Runtime interop
  • DirectXTK's SpriteFont
Closed Jun 16, 2015 at 8:18 PM by walbourn
Best solution here is to just use DirectX Tool Kit's SprietFont.


walbourn wrote Sep 8, 2013 at 10:18 PM

Currently the ATG font solution also does nothing with the CDXUTDialog::CalcTextRect call.

walbourn wrote Sep 8, 2013 at 10:58 PM

Samples/demos can already use DirectTK's SpriteFont instead of the DXUT Font solution, but the UI widgets need modification to do this.

walbourn wrote Sep 20, 2013 at 10:53 PM

DirectXTK SpriteFont usage is covered by workitem 1018