We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

.Net Font to Syncfusion FontStyle

Thread ID:





24951 Feb 15,2005 01:10 PM UTC Feb 15,2005 05:24 PM UTC WinForms 1
Tags: Diagram
Jose Santos
Asked On February 15, 2005 01:10 PM UTC

Hi, I was trying to convert from a .Net Font to a Syncfusion FontStyle. (The label fontstyle property from symbols) private static void NetFontToSyncfusionFont(//this function should exist in Syncfusion System.Drawing.Font f1, Syncfusion.Windows.Forms.Diagram.FontStyle f2){ f2.Family=f1.Family; f2.PointSize=f1.SizeInPoints; f2.Strikeout=f1.Strikeout; f2.Style=f1.Style; } What''s the correct way of doing this ?

Administrator [Syncfusion]
Replied On February 15, 2005 05:24 PM UTC

Hi Jose, The following is the method used by the Diagram.FontStyle class to create it''s System.Drawing.Font object, // FontStyle.CreateFont function public Font CreateFont() { return new Font(this.Family, this.Size, this.Style, this.Unit); } FontStyle.Family is a string value representing the FontFamily.Name property, the FontStyle.Size equates to the font size, the FontStyle.Style value is the System.Drawing.FontStyle eqivalent for the font and the FontStyle.Unit is the GraphicsUnit unit of measure to be used by the new font. You should initialize your Diagram.FontStyle object with values for the listed properties that will correctly reflect the System.Drawing.Font that you want. Prakash Syncfusion, Inc.,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon