C# get font from postscript name

社会主义新天地 提交于 2019-12-11 03:18:52

问题


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.

Similarly if "Arial-Black" is the input, the "Arial Black" font should be loaded.

Any ideas??

Note : "Arial-Black" is the postscript name of "Arial Black" font. "CourierNewPSMT" is the postcript name of "Courier New" font.

Thanks in advance.

Regards, James


回答1:


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.



来源:https://stackoverflow.com/questions/5775706/c-sharp-get-font-from-postscript-name

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!