The front, Cascadia Code, works for me using the document sample Drawing Text from Different Fonts on the Same Line.
Wrong font data from CreateFontIndirectW
kyle sylvestre
0
Reputation points
I'm getting the same font data regardless of the style. The font face name is Cascadia Code.
// log_font has lfFaceName, lfItalic, and lfWeight initialized
HFONT hfont = CreateFontIndirectW(&log_font);
HDC hdc = CreateCompatibleDC(NULL);
SelectObject(hdc, hfont);
std::vector<unsigned char> bytes;
DWORD size = GetFontData(hdc, 0, 0, NULL, 0);
bytes.resize(size);
GetFontData(hdc, 0, 0, &bytes[0], size);
1 answer
Sort by: Most helpful
-
Xiaopo Yang - MSFT 12,731 Reputation points Microsoft External Staff
2023-06-20T01:42:34.14+00:00