1 #include "stdafx.h" 2 #include "CUIDrawer.h" 3 #include "MusicPlayer2.h" 4 #include "Player.h" 5 6 CUIDrawer::CUIDrawer(UIColors& colors) 7 : m_colors(colors) 8 { 9 } 10 11 12 CUIDrawer::~CUIDrawer() 13 { 14 } 15 16 void CUIDrawer::DrawLryicCommon(CRect rect, Alignment align) 17 { 18 SetDrawArea(rect); 19 static int flag{}; 20 if (!IsDrawMultiLine(rect.Height())) 21 DrawLyricTextSingleLine(rect, flag, true, align); 22 else 23 DrawLyricTextMultiLine(rect, align); 24 } 25 26 int CUIDrawer::GetLyricTextHeight() const 27 { 28 //计算文本高度 29 if (!m_for_cortana_lyric) 30 m_pDC->SelectObject(&theApp.m_font_set.lyric.GetFont(theApp.m_ui_data.full_screen)); 31 else 32 m_pDC->SelectObject(&theApp.m_font_set.cortana.GetFont()); 33 return m_pDC->GetTextExtent(L"文").cy; //根据当前的字体设置计算文本的高度 34 } 35 36 void CUIDrawer::Create(CDC* pDC, CFont* pFont) 37 { 38 CDrawCommon::Create(pDC, pFont); 39 } 40 41 bool CUIDrawer::IsDrawMultiLine(int height) const 42 { 43 return height >= static_cast<int>(GetLyricTextHeight() * 3.5); 44 } 45 46 void CUIDrawer::SetForCortanaLyric(bool for_cortana_lyric) 47 { 48 m_for_cortana_lyric = for_cortana_lyric; 49 } 50 51 void CUIDrawer::DrawLyricTextMultiLine(CRect lyric_area, Alignment align) 52 { 53 // AUTO时多行歌词居中显示 54 if (align == Alignment::AUTO) align = Alignment::CENTER; 55 56 int line_space{}; 57 if (m_for_cortana_lyric) 58 { 59 line_space = theApp.DPI(4); 60 } 61 else 62 { 63 line_space = theApp.m_lyric_setting_data.lyric_line_space; 64 if (theApp.m_ui_data.full_screen) 65 line_space = static_cast<int>(line_space * CONSTVAL::FULL_SCREEN_ZOOM_FACTOR); 66 } 67 68 int lyric_height = GetLyricTextHeight() + line_space; //文本高度加上行间距 69 int lyric_height2 = lyric_height * 2 + line_space; //包含翻译的歌词高度 70 71 CFont* pOldFont = SetLyricFont(); 72 if (CPlayer::GetInstance().IsPlaylistEmpty()) //当前播放为空时在歌词区域显示播放提示 73 { 74 CFont* font = SetFont(&theApp.m_font_set.font10.GetFont()); 75 wstring no_track_tip_str = theApp.m_str_table.LoadTextFormat(L"UI_LYRIC_NO_TRACKS_TIP", { 76 theApp.m_accelerator_res.GetShortcutDescriptionById(ID_SHOW_PLAYLIST), 77 theApp.m_accelerator_res.GetShortcutDescriptionById(ID_FILE_OPEN), 78 theApp.m_accelerator_res.GetShortcutDescriptionById(ID_FILE_OPEN_FOLDER), 79 theApp.m_accelerator_res.GetShortcutDescriptionById(ID_MEDIA_LIB)}); 80 DrawWindowText(lyric_area, no_track_tip_str.c_str(), m_colors.color_text_2, Alignment::LEFT, false, true); 81 SetFont(font); 82 } 83 else if (CPlayerUIHelper::IsMidiLyric()) 84 { 85 wstring current_lyric{ CPlayer::GetInstance().GetMidiLyric() }; 86 DrawWindowText(lyric_area, current_lyric.c_str(), m_colors.color_text, Alignment::CENTER, false, true); 87 } 88 else if (CPlayer::GetInstance().m_Lyrics.IsEmpty()) 89 { 90 //没有歌词时显示歌曲信息 91 if (theApp.m_lyric_setting_data.show_song_info_if_lyric_not_exist) 92 { 93 CString song_info_str; 94 const SongInfo& cur_song{ CPlayer::GetInstance().GetCurrentSongInfo() }; 95 std::wstring artist{ cur_song.album_artist }; 96 if (artist.empty()) 97 artist = cur_song.GetArtist(); 98 song_info_str.Format(_T("%s - %s\r\n%s"), artist.c_str(), cur_song.GetAlbum().c_str(), cur_song.GetTitle().c_str()); 99 DrawWindowText(lyric_area, song_info_str, m_colors.color_text, align, false, true); 100 } 101 //显示“当前歌曲没有歌词” 102 else 103 { 104 static const wstring& no_lyric_info = theApp.m_str_table.LoadText(L"UI_LYRIC_NONE"); 105 DrawWindowText(lyric_area, no_lyric_info.c_str(), m_colors.color_text_2, Alignment::CENTER); 106 } 107 } 108 else 109 { 110 //CRect arect{ lyric_area }; //一行歌词的矩形区域 111 //arect.bottom = arect.top + lyric_height; 112 //vector<CRect> rects(CPlayer::GetInstance().m_Lyrics.GetLyricCount() + 1, arect); 113 //为每一句歌词创建一个矩形,保存在容器里 114 vector<CRect> rects; 115 int lyric_count = CPlayer::GetInstance().m_Lyrics.GetLyricCount() + 1; //获取歌词数量(由于第一行歌词需要显示标题,所以这里要+1) 116 for (int i{}; i < lyric_count; i++) 117 { 118 CRect arect{ lyric_area }; 119 if (!CPlayer::GetInstance().m_Lyrics.GetLyric(i - 1).translate.empty() && theApp.m_lyric_setting_data.show_translate) 120 arect.bottom = arect.top + lyric_height2; 121 else 122 arect.bottom = arect.top + lyric_height; 123 rects.push_back(arect); 124 } 125 int center_pos = (lyric_area.top + lyric_area.bottom) / 2; //歌词区域的中心y坐标 126 Time time{ CPlayer::GetInstance().GetCurrentPosition() }; //当前播放时间 127 int lyric_index = CPlayer::GetInstance().m_Lyrics.GetLyricIndex(time); // 当前歌词的序号 128 int progress{ CPlayer::GetInstance().m_Lyrics.GetLyricProgress(time, false, false, [this](const wstring& str) { return GetTextExtent(str.c_str()).cx; }) }; // 当前歌词进度(范围为0~1000),多行歌词使用的进度不含进度符号 129 int y_progress; //当前歌词在y轴上的进度 130 if (!CPlayer::GetInstance().m_Lyrics.GetLyric(lyric_index).translate.empty() && theApp.m_lyric_setting_data.show_translate) 131 y_progress = progress * lyric_height2 / 1000; 132 else 133 y_progress = progress * lyric_height / 1000; 134 //int start_pos = center_pos - y_progress - (lyric_index + 1)*lyric_height; //第1句歌词的起始y坐标 135 //计算第1句歌词的起始y坐标 136 //由于当前歌词需要显示在歌词区域的中心位置,因此从中心位置开始,减去当前歌词在Y轴上的进度 137 //再依次减去之前每一句歌词的高度,即得到了第一句歌词的起始位置 138 int start_pos; 139 start_pos = center_pos - y_progress; 140 for (int i{ lyric_index - 1 }; i >= -1; i--) 141 { 142 if (theApp.m_lyric_setting_data.show_translate && !CPlayer::GetInstance().m_Lyrics.GetLyric(i).translate.empty()) 143 start_pos -= lyric_height2; 144 else 145 start_pos -= lyric_height; 146 } 147 148 //依次绘制每一句歌词 149 for (int i{ -1 }; i < static_cast<int>(rects.size()) - 1; i++) 150 { 151 //计算每一句歌词的位置 152 if (i == -1) 153 rects[i + 1].MoveToY(start_pos); 154 else 155 rects[i + 1].MoveToY(rects[i].bottom); 156 //绘制歌词文本 157 if (!(rects[i + 1] & lyric_area).IsRectEmpty()) //只有当一句歌词的矩形区域和歌词区域的矩形有交集时,才绘制歌词 158 { 159 //设置歌词文本和翻译文本的矩形区域 160 CRect rect_text{ rects[i + 1] }; 161 CRect rect_translate; 162 const CLyrics::Lyric& lyric_i = CPlayer::GetInstance().m_Lyrics.GetLyric(i); 163 if (!lyric_i.translate.empty() && theApp.m_lyric_setting_data.show_translate) 164 { 165 rect_text.MoveToY(rect_text.top + line_space); 166 rect_text.bottom = rect_text.top + GetLyricTextHeight(); 167 rect_translate = rect_text; 168 rect_translate.MoveToY(rect_text.bottom + line_space); 169 } 170 171 if (i == lyric_index && progress < 1000) //绘制正在播放的歌词(处于逐渐过度到高亮过程中的歌词) 172 { 173 //这里实现文本从非高亮缓慢变化到高亮效果 174 int last_time_span = time - lyric_i.time_start; //当前播放的歌词已持续的时间 175 int fade_percent = last_time_span / 8; //计算颜色高亮变化的百分比,除数越大则持续时间越长,10则为1秒 176 COLORREF text_color = CColorConvert::GetGradientColor(m_colors.color_text_2, m_colors.color_text, fade_percent); 177 //绘制歌词文本 178 SetLyricFont(); 179 if (theApp.m_lyric_setting_data.lyric_karaoke_disp) 180 DrawWindowText(rect_text, lyric_i.text.c_str(), m_colors.color_text, m_colors.color_text_2, progress, align, true); 181 else 182 DrawWindowText(rect_text, lyric_i.text.c_str(), text_color, text_color, progress, align, true); 183 //绘制翻译文本 184 if (!lyric_i.translate.empty() && theApp.m_lyric_setting_data.show_translate) 185 { 186 SetLyricFontTranslated(); 187 DrawWindowText(rect_translate, lyric_i.translate.c_str(), text_color, text_color, progress, align, true); 188 } 189 } 190 else //绘制非正在播放的歌词 191 { 192 SetLyricFont(); 193 COLORREF text_color; 194 if (i == lyric_index - 1 || (i == lyric_index && progress == 1000)) // 绘制正在取消高亮的歌词(这里实现一句歌词颜色从高亮缓慢变化到非高亮效果),逐字歌词最后一句在此处取消高亮 195 { 196 int last_time_span = time - (lyric_i.time_start + lyric_i.time_span); // 引入逐字歌词后上句歌词结束后时长不等于当前播放的歌词已持续的时间,此处应当使用上句歌词结束时间 197 int fade_percent = last_time_span / 20; //计算颜色高亮变化的百分比,当持续时间为2000毫秒时为100%,即颜色缓慢变化的时间为2秒 198 text_color = CColorConvert::GetGradientColor(m_colors.color_text, m_colors.color_text_2, fade_percent); 199 } 200 else 201 { 202 text_color = m_colors.color_text_2; 203 } 204 //绘制歌词文本 205 DrawWindowText(rect_text, lyric_i.text.c_str(), text_color, align, true); 206 //绘制翻译文本 207 if (!lyric_i.translate.empty() && theApp.m_lyric_setting_data.show_translate) 208 { 209 SetLyricFontTranslated(); 210 DrawWindowText(rect_translate, lyric_i.translate.c_str(), text_color, align, true); 211 } 212 } 213 } 214 } 215 } 216 SetFont(pOldFont); 217 } 218 219 void CUIDrawer::DrawLyricTextSingleLine(CRect rect, int& flag, bool double_line, Alignment align) 220 { 221 CFont* pOldFont = SetLyricFont(); 222 223 if (CPlayerUIHelper::IsMidiLyric()) 224 { 225 wstring current_lyric{ CPlayer::GetInstance().GetMidiLyric() }; 226 DrawWindowText(rect, current_lyric.c_str(), m_colors.color_text, Alignment::CENTER, false, true); 227 } 228 else if (CPlayer::GetInstance().m_Lyrics.IsEmpty()) 229 { 230 //没有歌词时显示歌曲信息 231 if (theApp.m_lyric_setting_data.show_song_info_if_lyric_not_exist) 232 { 233 CString song_info_str; 234 const SongInfo& cur_song{ CPlayer::GetInstance().GetCurrentSongInfo() }; 235 song_info_str.Format(_T("%s - %s"), cur_song.GetArtist().c_str(), cur_song.GetTitle().c_str()); 236 static CDrawCommon::ScrollInfo lyric_scroll_info; 237 DrawScrollText(rect, song_info_str, m_colors.color_text, CPlayerUIHelper::GetScrollTextPixel(), theApp.m_lyric_setting_data.lyric_align != Alignment::LEFT, lyric_scroll_info); 238 } 239 //显示“当前歌曲没有歌词” 240 else 241 { 242 static const wstring& no_lyric_info = theApp.m_str_table.LoadText(L"UI_LYRIC_NONE"); 243 DrawWindowText(rect, no_lyric_info.c_str(), m_colors.color_text_2, Alignment::CENTER); 244 } 245 } 246 else 247 { 248 SetDrawArea(rect); 249 CRect lyric_rect = rect; 250 251 static const wstring& empty_lyric = theApp.m_str_table.LoadText(L"UI_LYRIC_EMPTY_LINE"); 252 const bool karaoke{ theApp.m_lyric_setting_data.lyric_karaoke_disp }; 253 const bool ignore_blank{ theApp.m_lyric_setting_data.donot_show_blank_lines}; 254 auto& now_lyrics{ CPlayer::GetInstance().m_Lyrics }; 255 Time time{ CPlayer::GetInstance().GetCurrentPosition() }; 256 CLyrics::Lyric current_lyric{ now_lyrics.GetLyric(time, false, ignore_blank, karaoke) }; 257 int progress{ now_lyrics.GetLyricProgress(time, ignore_blank, karaoke, [this](const wstring& str) { return GetTextExtent(str.c_str()).cx; }) }; 258 bool switch_flag{ flag > 5000 }; 259 switch_flag ^= (flag % 5000) > progress; 260 flag = switch_flag ? 10000 + progress : progress; 261 262 if (current_lyric.text.empty()) 263 current_lyric.text = empty_lyric; 264 //双行显示歌词 265 if (double_line && (current_lyric.translate.empty() || !theApp.m_lyric_setting_data.show_translate) && rect.Height() > static_cast<int>(GetLyricTextHeight() * 1.73)) 266 { 267 wstring next_lyric_text; 268 next_lyric_text = now_lyrics.GetLyric(time, true, ignore_blank, karaoke).text; 269 if (next_lyric_text.empty()) 270 next_lyric_text = empty_lyric; 271 //这里实现文本从非高亮缓慢变化到高亮效果 272 int last_time_span = time - current_lyric.time_start; //当前播放的歌词已持续的时间 273 int fade_percent = last_time_span / 8; //计算颜色高亮变化的百分比,除数越大则持续时间越长,10则为1秒 274 if (progress == 1000) fade_percent = 0; // 进度为1000时当前歌词“已完成”不再高亮 275 // 这里的fade_percent当合并空行开启时可能为负,在颜色渐变处规范取值,此处不再处理 276 DrawLyricDoubleLine(lyric_rect, current_lyric.text.c_str(), next_lyric_text.c_str(), align, progress, switch_flag, fade_percent); 277 } 278 else 279 { 280 // AUTO时单行歌词居中显示 281 if (align == Alignment::AUTO) align = Alignment::CENTER; 282 // 单行歌词在这里显示翻译,同时更新歌词区域为单行有翻译时的位置 283 if (theApp.m_lyric_setting_data.show_translate && !current_lyric.translate.empty() && rect.Height() > static_cast<int>(GetLyricTextHeight() * 1.73)) 284 { 285 lyric_rect.bottom = lyric_rect.top + rect.Height() / 2; 286 CRect translate_rect = lyric_rect; 287 translate_rect.MoveToY(lyric_rect.bottom); 288 289 SetLyricFontTranslated(); 290 DrawWindowText(translate_rect, current_lyric.translate.c_str(), m_colors.color_text, m_colors.color_text, progress, align, true); 291 } 292 // 绘制单行歌词 293 SetLyricFont(); 294 if (theApp.m_lyric_setting_data.lyric_karaoke_disp) 295 DrawWindowText(lyric_rect, current_lyric.text.c_str(), m_colors.color_text, m_colors.color_text_2, progress, align, true); 296 else if (0 < progress && progress < 1000) // 仅高亮“正在进行”的歌词 297 DrawWindowText(lyric_rect, current_lyric.text.c_str(), m_colors.color_text, m_colors.color_text, progress, align, true); 298 else 299 DrawWindowText(lyric_rect, current_lyric.text.c_str(), m_colors.color_text_2, m_colors.color_text_2, progress, align, true); 300 } 301 } 302 303 SetFont(pOldFont); 304 } 305 306 void CUIDrawer::DrawSpectrum(CRect rect, SpectrumCol col, bool draw_reflex /*= false*/, bool low_freq_in_center, bool fixed_width, Alignment alignment) 307 { 308 int cols; //要显示的频谱柱形的数量 309 switch (col) 310 { 311 case CUIDrawer::SC_64: 312 cols = 64; 313 break; 314 case CUIDrawer::SC_32: 315 cols = 32; 316 break; 317 case CUIDrawer::SC_16: 318 cols = 16; 319 break; 320 case CUIDrawer::SC_8: 321 cols = 8; 322 break; 323 default: 324 cols = SPECTRUM_COL; 325 break; 326 } 327 int max_width{ rect.Width() }; 328 if (fixed_width) 329 { 330 if (col == SC_64) 331 { 332 max_width = DPI(280); 333 } 334 } 335 int gap_width{ max_width * (SPECTRUM_COL / cols) / 168 }; //频谱柱形间隙宽度 336 if (theApp.m_ui_data.full_screen && !m_for_cortana_lyric) 337 gap_width = static_cast<int>(gap_width * CONSTVAL::FULL_SCREEN_ZOOM_FACTOR); 338 int width = (max_width - (cols - 1) * gap_width) / (cols - 1); 339 if (gap_width < 1) 340 gap_width = 1; 341 if (width < 1) 342 width = 1; 343 344 if (fixed_width) 345 SetDrawArea(rect); 346 DrawSpectrum(rect, width, gap_width, cols, m_colors.color_spectrum, draw_reflex, low_freq_in_center, alignment); 347 } 348 349 void CUIDrawer::DrawSpectrum(CRect rect, int col_width, int gap_width, int cols, COLORREF color, bool draw_reflex /*= false*/, bool low_freq_in_center, Alignment alignment) 350 { 351 CRect rc_spectrum_top = rect; 352 if (draw_reflex) //如果要绘制倒影,则倒影占总高度的1/3 353 rc_spectrum_top.bottom = rect.top + (rect.Height() * 2 / 3); 354 355 CRect rects[SPECTRUM_COL]; 356 rects[0] = rc_spectrum_top; 357 rects[0].right = rects[0].left + col_width; 358 359 //频谱的实际宽度 360 int width_actrual{ col_width * cols + gap_width * (cols - 1) }; 361 //如果频谱的实际宽度小于矩形的宽度,则让根据alignment的值让频谱居中或右对齐显示 362 if ((width_actrual < rect.Width() && alignment == Alignment::CENTER) || (width_actrual >= rect.Width() && theApp.m_app_setting_data.spectrum_low_freq_in_center)) 363 rects[0].MoveToX(rects[0].left + (rect.Width() - width_actrual) / 2); 364 else if (width_actrual < rect.Width() && alignment == Alignment::RIGHT) 365 rects[0].MoveToX(rects[0].left + (rect.Width() - width_actrual)); 366 367 for (int i{ 1 }; i < cols; i++) 368 { 369 rects[i] = rects[0]; 370 rects[i].left += (i * (col_width + gap_width)); 371 rects[i].right += (i * (col_width + gap_width)); 372 } 373 for (int i{}; i < cols; i++) 374 { 375 int index; 376 if (low_freq_in_center) 377 { 378 if (i < cols / 2) 379 index = (-i + cols / 2) * 2 - 1; 380 else 381 index = (i - cols / 2) * 2; 382 } 383 else 384 { 385 index = i; 386 } 387 if (index >= cols) 388 index = cols; 389 if (index < 0) 390 index = 0; 391 float spetral_data = CPlayer::GetInstance().GetSpectralData()[index * (SPECTRUM_COL / cols)]; 392 float peak_data = CPlayer::GetInstance().GetSpectralPeakData()[index * (SPECTRUM_COL / cols)]; 393 394 CRect rect_tmp{ rects[i] }; 395 int spetral_height = static_cast<int>(spetral_data * rects[0].Height() / 30 * theApp.m_app_setting_data.sprctrum_height / 100); 396 int peak_height = static_cast<int>(peak_data * rects[0].Height() / 30 * theApp.m_app_setting_data.sprctrum_height / 100); 397 if (spetral_height < 0 || CPlayer::GetInstance().IsError()) spetral_height = 0; //如果播放出错,不显示频谱 398 if (peak_height < 0 || CPlayer::GetInstance().IsError()) peak_height = 0; 399 400 int peak_rect_height = max(theApp.DPIRound(1.1), gap_width / 2); //顶端矩形的高度 401 spetral_height += peak_rect_height; //频谱至少和顶端矩形一样高 402 peak_height += peak_rect_height; 403 404 rect_tmp.top = rect_tmp.bottom - spetral_height; 405 if (rect_tmp.top < rects[0].top) rect_tmp.top = rects[0].top; 406 FillRect(rect_tmp, color, true); 407 //绘制倒影 408 if (draw_reflex) 409 { 410 CRect rc_invert = rect_tmp; 411 rc_invert.bottom = rect_tmp.top + rect_tmp.Height() * 2 / 3; 412 rc_invert.MoveToY(rect_tmp.bottom + gap_width); 413 FillAlphaRect(rc_invert, color, 96, true); 414 } 415 416 //绘制顶端 417 CRect rect_peak{ rect_tmp }; 418 rect_peak.bottom = rect_tmp.bottom - peak_height - gap_width; 419 rect_peak.top = rect_peak.bottom - peak_rect_height; 420 FillRect(rect_peak, color, true); 421 ////绘制顶端倒影 422 //CRect rc_peak_invert = rect_peak; 423 //rc_peak_invert.MoveToY(rc_invert.top + peak_height + theApp.DPIRound(1.1)); 424 //FillAlphaRect(rc_peak_invert, color, 96); 425 } 426 427 } 428 429 int CUIDrawer::DPI(int pixel) 430 { 431 if (theApp.m_ui_data.full_screen && !m_for_cortana_lyric) 432 return theApp.DPI(pixel * CONSTVAL::FULL_SCREEN_ZOOM_FACTOR); 433 else 434 return theApp.DPI(pixel); 435 } 436 437 void CUIDrawer::DrawLyricDoubleLine(CRect rect, LPCTSTR lyric, LPCTSTR next_lyric, Alignment align, int progress, bool switch_flag, int fade_percent) 438 { 439 CFont* pOldFont = SetLyricFont(); 440 441 CRect up_rect{ rect }, down_rect{ rect }; //上半部分和下半部分歌词的矩形区域 442 up_rect.bottom = up_rect.top + (up_rect.Height() / 2); 443 down_rect.top = down_rect.bottom - (down_rect.Height() / 2); 444 445 // 对齐方式为AUTO时使用上左下右的卡拉OK对齐方式 446 Alignment up_align{ Alignment::LEFT }, down_align{ Alignment::RIGHT }; 447 if (align != Alignment::AUTO) 448 up_align = down_align = align; 449 450 COLORREF color1, color2; 451 if (theApp.m_lyric_setting_data.lyric_karaoke_disp) 452 { 453 color1 = m_colors.color_text; 454 color2 = m_colors.color_text_2; 455 } 456 else 457 { 458 color1 = color2 = CColorConvert::GetGradientColor(m_colors.color_text_2, m_colors.color_text, fade_percent); 459 } 460 461 // 绘制当前歌词 462 if (!switch_flag) 463 { 464 DrawWindowText(up_rect, lyric, color1, color2, progress, up_align); 465 DrawWindowText(down_rect, next_lyric, m_colors.color_text_2, down_align); 466 } 467 else 468 { 469 DrawWindowText(up_rect, next_lyric, m_colors.color_text_2, up_align); 470 DrawWindowText(down_rect, lyric, color1, color2, progress, down_align); 471 } 472 SetFont(pOldFont); 473 } 474 475 CFont* CUIDrawer::SetLyricFont() 476 { 477 if (!m_for_cortana_lyric) 478 return SetFont(&theApp.m_font_set.lyric.GetFont(theApp.m_ui_data.full_screen)); 479 else 480 return SetFont(&theApp.m_font_set.cortana.GetFont()); 481 } 482 483 CFont* CUIDrawer::SetLyricFontTranslated() 484 { 485 if (!m_for_cortana_lyric) 486 return SetFont(&theApp.m_font_set.lyric_translate.GetFont(theApp.m_ui_data.full_screen)); 487 else 488 return SetFont(&theApp.m_font_set.cortana_translate.GetFont()); 489 } 490