LOGFONT lf; lf.lfHeight = 20; lf.lfWidth = 10; lf.lfEscapement = 0; lf.lfOrientation = 0; lf.lfWeight = FW_NORMAL; lf.lfItalic = TRUE; lf.lfUnderline = FALSE; lf.lfStrikeOut = FALSE; lf.lfCharSet = DEFAULT_CHARSET; lf.lfOutPrecision = OUT_DEFAULT_PRECIS; lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; lf.lfQuality = DEFAULT_QUALITY; lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; strcpy_s(lf.lfFaceName, LF_FACESIZE, "Arial"); CFont font; font.CreateFontIndirect(&lf);In the above example, we first create a LOGFONT structure and set its properties like font height, font width, and more. Then, we create a new CFont object and call the CreateFontIndirect function, passing the reference of the LOGFONT structure in which we have specified the properties of the font we want to create. This function is a part of the Microsoft Foundation Class Library (MFC) package in C++.