Namespace BlamRendering::DirectX::D2D::MF

Namespace containing things relating to the Namespace BlamRendering::DirectX::D2D::MF font loader.

Detailed Description

This is normally a major “hell no” for me personally - adding code without understanding how it works. However, this is one case where I’m making a temporary exception.

The namespace and classes within are named after (partial) author, M_F. The basis of the code was taken from the following reply on StackOverflow: https://stackoverflow.com/questions/37572961/c-directwrite-load-font-from-file-at-runtime/37645622#37645622

The font loader is used to read TrueType font files and make them available with DirectWrite. Yes. It really does require all this convoluted and complex bullshit to work.

This is also the single instance in the Namespace BlamRendering::DirectX API where you MUST implement an interface into your own class and essentially “finish” the class. In all other parts of the API, you can do that, or you can just declare an instance of the interface itself like so:

ID3D11Device*d3d_device=NULL;

Then creating it using the appropriate functions. But no - in this specific case, you must finish the work yourself - and maybe I’m just an idiot, but the documentation does not make it very easy to know how to do that.