0

im using DirectN in my project, everything else works fine, i can use DWriteFunctions class to create a factory, except i can't find a class to access IDWriteLocalFontFileLoader interface to use the method inside. i googled a lot but i just don't know how to do that

  • IDWriteFactory::CreateFontFileReference(localpath, ...) will get you a IDWriteFontFile, and from this you can call IDWriteFontFile::GetLoader that you should be able to cast into a IDWriteLocalFontFileLoader since it was loaded with a local font file (if the file pointed by the path exists). – Simon Mourier Sep 01 '21 at 15:25
  • Microsoft has a code sample that illustrates an implementation for your scenario: https://github.com/microsoft/Windows-classic-samples/tree/main/Samples/DirectWriteCustomFontSets – Peter Constable Sep 24 '21 at 16:00

1 Answers1

0

You need to do this:

Simon Mourier
  • 132,049
  • 21
  • 248
  • 298