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

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

Mar 17, 2013 at 7:48 AM
hello
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 1:38 AM
Edited Mar 18, 2013 at 1: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 12:53 PM
hello walbourn
can you provide me more info how to do so.