本文介绍了基于字体签名的C#字体选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我有一个需要显示中文字符(最好是Unicode)的应用程序.在VS2008 C ++ Pro中,我可以通过字体签名过滤枚举字体:

I have an application that requires display of Chinese characters (preferably Unicode). In In VS2008 C++ Pro I can filter the enumerated fonts via font signature:

int CALLBACK MyApp::EnumFontCallback(...)
{
ENUMLOGFONTEX *lpelfe;
NEWTEXTMETRICEX *lpntme;

int nSimpCh = (lpntme->ntmFontSig.fsCsb[0] >> 17) && 0x1;
if (nSimpCh!=1) return;
int nTradCh = (lpntme->ntmFontSig.fsCsb[0] >> 19) && 0x1;
if (nTradCh=1) return;
...
else ListBox1.Items.Add(".....fontname ...");
....
}



如何在VS2010 C#(快速表达)中执行此操作?最接近的是InstalledFontCollection()和IsStyleAvailable()-但这非常简单,无法确定哪个字体家族包含Unicode中文.

谢谢.


[Edited]代码被包装在"pre"标签中[/Edited]



How can I do this in VS2010 C# (express)? The closest thingy is the InstalledFontCollection() and IsStyleAvailable() - but that is very simplistic and has no option to determine which of the font family contains Unicode Chinese.

Thanks.


Code is wrapped in "pre" tags[/Edited]

推荐答案



这篇关于基于字体签名的C#字体选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 00:19