问题描述
我需要使用给定的脚本名称来获取字体(System.drawing.Font).例如,如果我输入为"CourierNewPSMT",则应该加载Courier字体.
I need to get the font (System.drawing.Font), with the given postscript name. For example, if I give the input as "CourierNewPSMT", the Courier font should be loaded.
类似地,如果输入"Arial-Black",则应加载"Arial Black"字体.
Similarly if "Arial-Black" is the input, the "Arial Black" font should be loaded.
任何想法?
注意:"Arial-Black"是"Arial Black"字体的后记名称. "CourierNewPSMT"是"Courier New"字体的后记名称.
Note : "Arial-Black" is the postscript name of "Arial Black" font. "CourierNewPSMT" is the postcript name of "Courier New" font.
谢谢.
关于,詹姆斯
推荐答案
如果您使用的是Mac,则可以在Font Book中查看字体,然后在View› Show Font Info下查看
If you're on a Mac, you can look at the font in Font Book and go under View › Show Font Info
您应该看到列出的所有不同的命名约定.
You should see all the different naming conventions listed.
这篇关于C#从脚本名称获取字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!