The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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 ?
ADAdministrator Syncfusion Team 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.,