Class FontUtils
Provides some utilities related to Fonts.
Inheritance
Inherited Members
Namespace: Neodynamic.Windows.ThermalLabelEditor
Assembly: cs.temp.dll.dll
Syntax
public class FontUtils
Methods
ConvertToFont(Drawing.Font)
Converts the specified System.Drawing.Font object to a Neodynamic.SDK.Printing.Font object.
Declaration
public static SDK.Printing.Font ConvertToFont(Drawing.Font gdiFont)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Font | gdiFont | The System.Drawing.Font to be converted to a Neodynamic.SDK.Printing.Font object. |
Returns
Type | Description |
---|---|
SDK.Printing.Font | A Neodynamic.SDK.Printing.Font object created based on the specified System.Drawing.Font object. |
ConvertToFont(Windows.Media.FontFamily)
Converts the specified System.Windows.Media.FontFamily object to a Neodynamic.SDK.Printing.Font object.
Declaration
public static SDK.Printing.Font ConvertToFont(Windows.Media.FontFamily fontFamily)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.FontFamily | fontFamily | The System.Windows.Media.FontFamily to be converted to a Neodynamic.SDK.Printing.Font object. |
Returns
Type | Description |
---|---|
SDK.Printing.Font | A Neodynamic.SDK.Printing.Font object created based on the specified System.Windows.Media.FontFamily object. |
ConvertToFontFamily(SDK.Printing.Font)
Converts the specified Neodynamic.SDK.Printing.Font object to a System.Windows.Media.FontFamily object.
Declaration
public static Windows.Media.FontFamily ConvertToFontFamily(SDK.Printing.Font font)
Parameters
Type | Name | Description |
---|---|---|
SDK.Printing.Font | font | The Neodynamic.SDK.Printing.Font to be converted to a System.Windows.Media.FontFamily object. |
Returns
Type | Description |
---|---|
System.Windows.Media.FontFamily | A System.Windows.Media.FontFamily object created based on the specified Neodynamic.SDK.Printing.Font object. |
ConvertToGdiFont(SDK.Printing.Font)
Converts the specified Neodynamic.SDK.Printing.Font object to a System.Drawing.Font object.
Declaration
public static Drawing.Font ConvertToGdiFont(SDK.Printing.Font font)
Parameters
Type | Name | Description |
---|---|---|
SDK.Printing.Font | font | The Neodynamic.SDK.Printing.Font to be converted to a System.Drawing.Font object. |
Returns
Type | Description |
---|---|
System.Drawing.Font | A System.Drawing.Font object created based on the specified Neodynamic.SDK.Printing.Font object. |
Remarks
This method will not work for custom font files. If the Neodynamic.SDK.Printing.Font object is a custom font file, then invoke the ConvertToGdiFontFamily method instead.
ConvertToGdiFontFamily(SDK.Printing.Font, out Drawing.Text.PrivateFontCollection)
Converts the specified Neodynamic.SDK.Printing.Font object to a System.Drawing.FontFamily object.
Declaration
public static Drawing.FontFamily ConvertToGdiFontFamily(SDK.Printing.Font font, out Drawing.Text.PrivateFontCollection fontCollection)
Parameters
Type | Name | Description |
---|---|---|
SDK.Printing.Font | font | The Neodynamic.SDK.Printing.Font to be converted to a System.Drawing.FontFamily object. |
System.Drawing.Text.PrivateFontCollection | fontCollection | A System.Drawing.Text.PrivateFontCollection object which needs to be disposed after using the created System.Drawing.FontFamily object. |
Returns
Type | Description |
---|---|
System.Drawing.FontFamily | A System.Drawing.FontFamily object created based on the specified Neodynamic.SDK.Printing.Font object. |