I came across the inconvenient behavior of CEdit when adjusting its font: for a certain font size, letters like "g" or "j" have the missing part, regardless of the height of the CEdit rectangle. Here are two examples:
CFont *ctrlFont = new CFont(); ctrlFont ->CreatePointFont(80, "Arial Black"); CEdit m_editName; m_editName.SetFont(ctrlFont);
with this result: 
but for
ctrlFont ->CreatePointFont(100, "Arial Black");
everything is good 
As you can see, the height of the CEdit rectangle is greater than the height of the text in both cases. The parent control is CDialog; the font is set to ::OnInitDialog , and the size of CEdit is set using the SetWindowPos method to ::OnShowWindow . What can cause this, and how should I deal with it?
Edit: I tried the @rrirower sentence, and now I'm being fooled; adding CEdit CDC initialization to CFont greatly changed the text mask (you may not see it from the very beginning, but I have another edit with the old font on the same page and there is a big difference):
ctrlFont1->CreatePointFont(80, "Arial Black", m_editName.GetDC());

source share