简体   繁体   English

Windows窗体控件 - Wingding的字体不变

[英]Windows Form Controls - Font not changing for Wingding

I have a Visual Studio 2013 Windows Forms C# project to which I earlier added a button that used the Wingdings 3 font - and it worked. 我有一个Visual Studio 2013 Windows Forms C#项目,我之前添加了一个使用Wingdings 3字体的按钮 - 它工作正常。 I've since created a new solution and tried the same thing but whenever I select Wingdings as the Font Name for any type of Windows Forms Control it always defaults to the Microsoft Sans Serif font in the Form Designer. 我已经创建了一个新的解决方案并尝试了同样的事情,但每当我选择Wingdings作为任何类型的Windows窗体控件的字体名称时,它总是默认为窗体设计器中的Microsoft Sans Serif字体。 For other fonts the Designer picks up the changes. 对于其他字体,Designer会选择更改。 I've also noticed that the same problem also ocurrs in my Visual Studio 2008 environment. 我也注意到同样的问题在我的Visual Studio 2008环境中也很突出。

Could I have inadvertently changed an environment setting which disables fonts of certain type? 我是否可能无意中更改了禁用某种类型字体的环境设置?

In visual studio, click on the control and in the property section expand the font section. 在visual studio中,单击控件,然后在属性部分中展开字体部分。 Change the Font to Wingdings and the GdiCharSet value from 0 to 2. Wingdings should be working for you then. 将Font更改为Wingdings并将GdiCharSet值从0更改为2.然后Wingdings应该适合您。

I'm using Visual Studio 2015. Hopefully your version has the same option. 我正在使用Visual Studio 2015.希望您的版本具有相同的选项。

after reasearching a little on stackoverflow, I come up with this unicode solution: 在对stackoverflow进行了一些重新研究之后,我想出了这个unicode解决方案:

Unicode alternative Unicode替代方案

与标签和Wingdings 2有同样的问题2.在控件属性中将UseCompatibleTextRendering设置为True对我有用

Be careful with this font though, it is not a standard font and hence not support by all applications. 但请注意这种字体,它不是标准字体,因此不支持所有应用程序。 You may be able to find a standard Unicode alternative 您可能能够找到标准的Unicode替代方案

Wingdings font family does not seem to work on Firefox and Opera Wingdings字体系列似乎不适用于Firefox和Opera

gdicharset set to 1 (default) and it will be fixed. gdicharset设置为1(默认值),它将被修复。 Don't move UseCompatibleTextRendering to true, leave it as false. 不要将UseCompatibleTextRendering移动为true,将其保留为false。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM