LAPTOP-T815PCOQ\25526
2024-11-27 af08046fe1cddba171826f619d823dee02a79ca0
SourceCode/Bond/BondEq/View/UserManagerDlg.cpp
@@ -440,23 +440,10 @@
   int fontSize = nHeight / 2;
   if (fontSize < 8) fontSize = 8;
   // 检查字体是否已经存在
   auto it = m_mapFonts.find(fontSize);
   if (it == m_mapFonts.end()) {
      // 动态创建新字体
      CFont* newFont = new CFont();
      LOGFONT logFont = { 0 };
      _tcscpy_s(logFont.lfFaceName, _T("Segoe UI"));
      logFont.lfHeight = -fontSize;
      logFont.lfQuality = CLEARTYPE_QUALITY; // 启用 ClearType 抗锯齿
      newFont->CreateFontIndirect(&logFont);
   // 获取或创建字体
   CFont* pFont = GetOrCreateFont(fontSize);
      // 存储到字体管理容器中
      m_mapFonts[fontSize] = newFont;
      it = m_mapFonts.find(fontSize);
   }
   pWnd->SetFont(it->second);
   pWnd->SetFont(pFont);
   pWnd->Invalidate(); // 刷新控件显示
}