I’m writing a C++ app that uses AddFontMemResourceEx
to load a new font. The problem is that to use it, I need to specify pszFaceName
in the CreateFontA
call. All of the resources I have read use a literal value like “YourFontName” as name, but the font is loaded by the user, so I need to get its name. Using the font file name is unreliable.
I have also tried to use EnumFontFamiliesEx
: once before adding the font and once after, collecting results each time. However, it seems that the added font is not enumerable, cause collections are equal.
Maybe I have missed something? How can I get this name?