I have a LOGFONT structure that I convert to an IDWriteFont using CreateFontFromLOGFONT():
IDWriteFont* dWriteFont = nullptr;
if (FAILED(dWriteGdiInterop->CreateFontFromLOGFONT(&logFont, &dWriteFont))) return;
If the LOGFONT describes a Tw Cen MT Condensed font, I would like to have the DirectWrite's font have the DWRITE_FONT_STRETCH_CONDENSED attribute assigned.
The LOGFONT has width '0', whatever stretch I choose (condensend, wide, etcetera). It seems the stretch can only be deducted from the font name, and DirectWrite's method fails to do so. Is this a bug?
How can I create a DirectWrite font with a certain stretch, based on a LOGFONT structure?