I'm having a hard time grasping the problem getting the newer/extended functions in dwrite_1.h to work with my existing code and hope that someone here can shed some light.

This is my existing set up...

IDWriteFactory* pDWriteFactory_ = nullptr;
IDWriteTextFormat* pTextFormat_ = nullptr;
IDWriteTextLayout* pTextLayout_ = nullptr;
IDWriteTextRenderer* pTextRenderer_ = nullptr;

//CPP File in my PrepareText() Fcuntion.
hr = pDWriteFactory_->CreateTextLayout(

I would like to be able to use the IDWriteTextLayout1::SetCharacterSpacing function outlined here : MSDN Link

However if I change my IDWriteTextLayout* to be IDWriteTextLayout1* I get an error as pDWriteFactory_ cannot be initialised with an IDWriteTextLayout1 as an argument. This error occurs if I change IDWriteFactory* to an IDWriteFactory1* also.

What am I missing? Many thanks!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.