系统字体可能存在的几种

计算机\HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MIME\Database\Codepage\936

 

微软雅黑:msyh.ttc
msyhbd.ttc
msyhl.ttc

 

CString strFontName0,strFontName1, strFontName2,strFontName3;

	HFONT hfont = (HFONT)GetStockObject(SYSTEM_FONT);
	if (hfont != NULL)
	{
		LOGFONT lf0 = { 0 };
		::GetObject(hfont, sizeof(LOGFONT), &lf0);
		strFontName0 = lf0.lfFaceName;
		strFontName0 = _T("SYSTEM_FONT:") + strFontName0 + _T("\n");
		::DeleteObject(hfont);
	}

	 hfont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
	if (hfont != NULL)
	{
		LOGFONT lf1 = { 0 };
		::GetObject(hfont, sizeof(LOGFONT), &lf1);
		strFontName1= lf1.lfFaceName;
		strFontName1 = _T("DEFAULT_GUI_FONT:") + strFontName1+_T("\n");
		::DeleteObject(hfont);
	}

	
	
	LOGFONT lf2;
	GetFont()->GetLogFont(&lf2);
	strFontName2 = lf2.lfFaceName;
	strFontName2 = _T("GetFont:") + strFontName2 + _T("\n");
		
	LOGFONT lf3;
	 SystemParametersInfo(SPI_GETICONTITLELOGFONT,sizeof(LOGFONT),&lf3,0);
	 strFontName3 = lf3.lfFaceName;
	 strFontName3 = _T("SPI_GETICONTITLELOGFONT:") + strFontName3 + _T("\n");
	
	 AfxMessageBox(strFontName0+strFontName1+ strFontName2+ strFontName3);

SYSTEM_FONT系统字体:system
DEFAULT_GUI_FONT界面字体:中文:宋体,英文:ms shell Dlg (Microsoft Sans Serif)
GetFont框架:ms shell Dlg 2(Tahoma),
SPI_GETICONTITLELOGFONT主题字体:中文:微软雅黑,英文:Segoe UI


宋体文件:SIMSUN.TTC
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize]
"DisableRemoteFontBootCache"=dword:00000000
"GUIFont.CharSet"=dword:00000086
"GUIFont.Facename"="SimSun"
"GUIFont.Height"=dword:00000009
"LastBootTimeFontCacheState"=dword:00000001
"ServicingStackModifiedFonts"=dword:00000002

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize\LargeFont]
"FIXEDFON.FON"="s8514fix.fon"       ->Fixedsys
"FONTS.FON"="s8514sys.fon"        ->system
"OEMFONT.FON"="s8514oem.fon"     ->Terminal

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize\SmallFont]
"FIXEDFON.FON"="svgafix.fon"    ->Fixedsys
"FONTS.FON"="svgasys.fon"        ->system
"OEMFONT.FON"="vga936.fon"    ->Terminal
 

你可能感兴趣的:(MFC/C++)