From aedb3b85fed48cb2cf0abb5fafa8e7591644c9f4 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期一, 02 十二月 2024 08:53:06 +0800
Subject: [PATCH] Merge branch 'liuyang' into clh

---
 SourceCode/Bond/BondEq/View/UserManagerDlg.cpp |   19 +++----------------
 1 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/SourceCode/Bond/BondEq/View/UserManagerDlg.cpp b/SourceCode/Bond/BondEq/View/UserManagerDlg.cpp
index 9daa3d1..10dddbd 100644
--- a/SourceCode/Bond/BondEq/View/UserManagerDlg.cpp
+++ b/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(); // 鍒锋柊鎺т欢鏄剧ず
 }
 

--
Gitblit v1.9.3