系统字体总结

一、字体在注册表的表现

1.window主题
计算机\HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics
中文:Microsoft YaHei UI
英文:segoe UI 

2.字体关系
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Fonts

3.初始化字体
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize
中文:SimSun
英文:无

4.代码页关联字体
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MIME\Database\Codepage\936
935中文:SimSun
950繁体:FixedWidthFont=MingLiu,ProportionalFont=New MingLiu
1252英文:FixedWidthFont= Courier New,ProportionalFont=Arial

5.框架字体
MS Shell Dlg=Microsoft Sans Serif
MS Shell Dlg 2=Tahoma->中文实际是宋体,应该有个关联的地方,所以如果中文系统丢失了tahoma字体,程序界面字体可能会变成随机一种字体

6.
计算机\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\FontAssoc\Associated DefaultFonts
中文:AssocSystemFont=simsun.ttc,FontPackage=新宋体
英文:无

计算机\HKEY_USERS\S-1-5-21-2337859228-571890551-230831775-1001\Software\Microsoft\Internet Explorer\International\Scripts\26
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink

SimSun & NSimSun (TrueType)
宋体 & 新宋体 (TrueType)

系统字体:system
界面字体:中文:宋体,英文:ms shell Dlg (Microsoft Sans Serif)
框架:ms shell Dlg 2(Tahoma),
主题字体:中文:微软雅黑,英文: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

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MIME\Database\Codepage\936]
"BodyCharset"="gb2312"
"Description"="@%SystemRoot%\\system32\\mlang.dll,-4648"
"FixedWidthFont"="Simsun"
"Level"=hex:07,07,00,00
"ProportionalFont"="Simsun"
 

微软雅黑: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);

1.中文原版-中文语言包

 

2.中文原版-英文语言包

3.英文原版-英文语言包

 

三、字体的分辨

我们看GIJQR字符的区别

 

  • 4
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值