From 4169c1faf3a5047255fa3b63952893dd2978192b Mon Sep 17 00:00:00 2001 From: mhqschen Date: Fri, 1 Mar 2024 17:00:42 +0800 Subject: [PATCH] dwrite color font --- TrafficMonitor/TaskBarDlgDrawCommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TrafficMonitor/TaskBarDlgDrawCommon.cpp b/TrafficMonitor/TaskBarDlgDrawCommon.cpp index 25c9763f7..33294339b 100644 --- a/TrafficMonitor/TaskBarDlgDrawCommon.cpp +++ b/TrafficMonitor/TaskBarDlgDrawCommon.cpp @@ -1789,7 +1789,7 @@ void CTaskBarDlgDrawCommon::DrawWindowText(CRect rect, LPCTSTR lpszString, COLOR {layout_rect.left, layout_rect.top}, p_text_layout.Get(), m_p_d2d1_device_context_support->GetRawForeSolidColorBruch(), - D2D1_DRAW_TEXT_OPTIONS_NO_SNAP | D2D1_DRAW_TEXT_OPTIONS_CLIP); // 不允许文字超出边界 + D2D1_DRAW_TEXT_OPTIONS_NO_SNAP | D2D1_DRAW_TEXT_OPTIONS_CLIP | D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT); // 不允许文字超出边界 // 恢复状态 p_text_format->SetParagraphAlignment(old_vertical_align); p_text_format->SetTextAlignment(old_horizontal_align);