我怎样才能获得fontfamily的语言? [英] How can I get the language of the fontfamily?

查看:111
本文介绍了我怎样才能获得fontfamily的语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想创建一个  ComboBox  到
显示所有计算机上的字体。

I wanna create a ComboBox to show all the font on the computer.


我希望它按照 ComboBox


例如,列表将首先显示英文字体,然后显示德语字体,然后显示中文字体等。每种语言字体将分开但不能混合在一起。

For example, the list will show the English font first, and then show the German font, and then show the Chinese font and so on. Each language font will separate but no mix together.


以下是Photoshop的示例:

Here is a sample of Photoshop:



我发现Adobe Photoshop / Microsoft Word / Windows记事本和许多软件可以做到这一点。

I found that the Adobe Photoshop/Microsoft Word/Windows Notepad and many software can do this.


现在问题是如何在C#或WPF中执行此操作?请帮助我吗?谢谢。

Now the question is how can I do this in C# or WPF? Would you please help me? Thank you.


有人说字体没有任何语言,但微软和Adobe如何实现这一目标?Adobe不会告诉我任何事情,但我希望微软的官方告诉我更多关于此的信息。

Someone said that font has not any language, but how can Microsoft&Adobe achieve this? Adobe won't tell me any but I want official of Microsoft tells me more about this.

推荐答案


您可以使用  FontFamily.FamilyNames
并枚举 LanguageSpecificStringDictionary

You can use FontFamily.FamilyNames and enumerate LanguageSpecificStringDictionary





我试过了什么你说过,但是LanguageSpecificStringDictionary的键并不总是正确的。有时中文字体的键是"en-us"。我认为这是因为字体的作者之前没有设置它。

I tried what you said, but the keys of the LanguageSpecificStringDictionary is not always right. Sometimes the key of a Chinese font is "en-us". I think that's because the author of the font has not set it right before.


这篇关于我怎样才能获得fontfamily的语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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