C language function:CreateFontIndirectEx sample codesSearch sample code in the internet.It is the result.
TITLE : WinApi
tt HFONT CreateFontIndirectEx(_In_ const ENUMLOGFONTEXDV *penumlfex).......
TITLE : Writing DPI-Aware Desktop and Win32 Applications (Windows)
TITLE : Display Text Owner Draw Listbox - C++ Forum
To write with a specific font, you must first select it. To select a font, you must first "create" it. Actually, get a handle of it. Use CreateFontIndirect() or CreateFontIndirectEx() to get an HFONT, and if I remember correctly, you use SelectObject() to select the font as the current font. Once you have the font that you want, you write the text that goes with that font. Then you change fonts one more time and write the other part of the text........