Windows Server 2008 R2操作系统中的GDI +字体问题 [英] GDI+ font issue in Windows Server 2008 R2 Operating System

查看:428
本文介绍了Windows Server 2008 R2操作系统中的GDI +字体问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已经安装了"Minion Pro"。机器中的OTF字体和字体存在于"C:\ Windows \Fonts"中。文件夹但无法为"Minion Pro"创建System.Drawing.Font实例字体。


请找到代码片段:

 System.Drawing.Font minionPro = new System.Drawing .Font("Minion Pro",12); 
if(minionPro.Name!=" Minion Pro")
minionPro = new System.Drawing.Font(" Minion Pro Regular",12);




以上代码返回"Microsoft Sans Serif"。 Windows Server 2008 R2中的默认字体。在Windows 10操作系统中,此代码返回"Minion Pro"。正如所料。因此,特定于Windows Server 2008 R2会出现此问题。



任何人都可以提供帮助,如何在Windows 2008 R2中正确检索字体?

是否有任何已知限制?



b
$ b b谢谢,b


Mohanaselvam





解决方案

这是因为"Microsoft Sans Serif"创建
如果是字体系列无法创建


不确定此Adobe字体使用的格式,但根据
Wikipedia


虽然Microsoft最初只支持COLR / CPAL颜色格式,但支持所有不同的颜色格式,包括Apple的'sbix'格式在Windows 10周年更新中被添加到Microsoft Windows中。[21] 'sbix'表随后在版本1.8中向OpenType添加了
。[17]


由于Win2008R2使用与Win7相同的内核,可能确实不支持这种字体。


PS:您还可以看一下
此主题
用于解决Win7上的Adobe字体安装问题。

Hi,

I have installed the "Minion Pro" OTF font in the machine and the font exists in the "C:\Windows\Fonts" folder but unable to create System.Drawing.Font instance for "Minion Pro" font.

Please find the code snippet:

System.Drawing.Font minionPro = new System.Drawing.Font("Minion Pro", 12);
        if(minionPro.Name !=  "Minion Pro")
            minionPro = new System.Drawing.Font("Minion Pro Regular", 12);


The above code returns the "Microsoft Sans Serif" the default font in Windows Server 2008 R2. And in Windows 10 OS, this code returns "Minion Pro" as expected. So this problem occurs specific to Windows Server 2008 R2.

Can anyone help on this, how to retrieve the fonts properly in Windows 2008 R2?
Is there any known limitation?



Thanks,

Mohanaselvam


解决方案

It's because "Microsoft Sans Serif" is created if the font family cannot be created.

Not sure what format does this Adobe font use, but according to Wikipedia:

While Microsoft originally supported only the COLR/CPAL color format, support for all of the different color formats, including Apple's 'sbix' format, was added to Microsoft Windows in the Windows 10 Anniversary Update.[21] The 'sbix' table was subsequently added to OpenType in version 1.8.[17]

Since Win2008R2 uses the same kernel as Win7, maybe this font indeed is not supported there.

P.S.: You may also what to take a look on this thread for troubleshooting Adobe font install issues on Win7.


这篇关于Windows Server 2008 R2操作系统中的GDI +字体问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆