Bil*_*soe 4 c# opentype winforms
我尝试过使用Open Type Fonts作为标签,文本框以及在绘画事件中绘图时.但它不起作用.有没有办法让Open Type Font工作?
小智 5
System.Windows.Media
您可以像在 WPF 中一样使用命名空间,这里有一个示例:
public static string GetFontList(String ElementSeparator)
{
string r = "";
// WPF incl Adobe and OpenType
foreach (System.Windows.Media.FontFamily fontFam in System.Windows.Media.Fonts.SystemFontFamilies)
{
r += fontFam.Source;
r += ElementSeparator;
}
// True type, incl Type face names e.g. Arial Rounded MT Bold
foreach (System.Drawing.FontFamily f in System.Drawing.FontFamily.Families)
{
if(!r.Contains(f.Name))
{
r += f.Name;
r += ElementSeparator;
}
}
return r;
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3982 次 |
最近记录: |