85286

C# get font from postscript name

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

Answer1:

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.

Recommend

  • Font awesome icon button with label below
  • How to connect string from my class to form
  • How to make the horizontal scroll bar appear in a JScrollPane that contains a JTextPane component
  • How would I run this as an apple executable file?
  • Does using package generics require the package to be in Depends or Imports?
  • Obtain access token for both Microsoft Graph and individual service API endpoints (Outlook REST APIs
  • CSS Local Font not showing up
  • Toggle visibility of text box based on status of check box -jQuery
  • Fade Background but NOT Text
  • How to make a div appear under button
  • Imagemagick set interline spacing?
  • QObject::findChild() returns None without obvious reason
  • AlertDialog style when using setView()
  • Understanding RTF and edit it with vb.net
  • HTML5 video only works in IE. The other browsers shows the black screen
  • How To Customize ASP.NET Chart Databound To SqlDataSource
  • Android Activity.onWindowFocusChanged doesn't get called from within TabHost
  • Zoom in and out of jPanel
  • AndEngine Applying Transparancy to AndEngine View
  • Graphics.CopyFromScreen [Web application] + The handle is invalid
  • Debug.DrawLine not showing in the GameView
  • How to change the font size of a single index for UISegmentedControl?
  • Highlight and Bold text in JTextPane
  • Ajax Loaded meta Tags
  • Xamarin Forms - UWP Fonts
  • Java Scanner input dilemma. Automatically inputs without allowing user to type
  • JFileChooser in front of fullscreen Swing application
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • Change an a tag attribute in JavaScript based on screen width
  • what is the difference between the asp.net mvc application and asp.net web application
  • Timeout for blocking function call, i.e., how to stop waiting for user input after X seconds?
  • Unanticipated behavior
  • Matrix multiplication with MKL
  • File upload with ng-file-upload throwing error
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • Proper folder structure for lots of source files
  • Free memory of cv::Mat loaded using FileStorage API
  • Java static initializers and reflection
  • How does Linux kernel interrupt the application?
  • Binding checkboxes to object values in AngularJs