带图形的自定义字体样式
我有以下字体列表:
我通过使用它们没有任何问题
new Font("XXXX Sans", 21, FontStyle.Bold, GraphicsUnit.Pixel)
但是,当我需要使用非标准字体时我该怎么办风格喜欢光?所提供的只是一个枚举,这是不合适的。
I have the following list of fonts:
I have no issues with using them via
new Font("XXXX Sans", 21, FontStyle.Bold, GraphicsUnit.Pixel)
However, what do i do when i need to use a non-standard font style like light? All that is provided is an enumeration and that is not suitable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不能只使用控制面板中显示的字体名称吗?大多数不规则、粗体或斜体的字体实际上都有一个“规则”的子家族类型。如果您从 Microsoft 下载字体属性扩展,您可以在“名称”选项卡上看到它。控制面板列出它们的方式和 .Net 了解它们的方式有时是不同的,因此最好从 .Net 的角度列出所有字体:
这是一个使用 Franklin Gothic Demi Cond 的示例(这是在 CP 中列为“Franklin Gothic Cond Demi”)
Can you not just use the font name as it appears in the control panel? Most fonts that aren't regular, bold or italic actually have a subfamily type of "regular" anyways. If you download the font properties extensions from Microsoft you can see this on the Names tab. The way the the control panels lists them and the way that .Net knows about them is sometimes different so its a good idea to list out all of the fonts from .Net's perspective:
And here's a sample that use Franklin Gothic Demi Cond (which is listed in the CP as "Franklin Gothic Cond Demi")