creating component library to draw texts using DirectXTK on Windows Phone 8

Mar 17, 2013 at 6:48 AM
i want to create component library that exports methods for text rendering and primitives
and i want to use DirectXTK to support 2D features on Windows Phone 8 , now i looked to the text rendering on DirectXTK , it uses compiled files and get the font from it,
now how can i embed these complied files within my component and use it in another application.
Mar 18, 2013 at 12:38 AM
Edited Mar 18, 2013 at 12:38 AM
We solve a similar problem with the HLSL shaders by having the FXC tool generate a C header file with the compiled data embedded inside of it. You could so something similar with the .spritefont binary file and use the SpriteFont constructor that takes the data in memory. You just need to write a simple tool that converts a binary file into a C BYTE array source file.
SpriteFont(_In_ ID3D11Device* device, _In_reads_bytes_(dataSize) uint8_t const* dataBlob, _In_ size_t dataSize);
Mar 31, 2013 at 11:53 AM
hello walbourn
can you provide me more info how to do so.