Class FontFamilyCollectionExtensions
A readonly collection of fonts.
Inherited Members
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public static class FontFamilyCollectionExtensions
Methods
| Improve this Doc View SourceCreateFont(FontFamily, Single)
Create a new instance of the Font for the named font family with regular styling.
Declaration
public static Font CreateFont(this FontFamily fontFamily, float size)
Parameters
Type | Name | Description |
---|---|---|
FontFamily | fontFamily | The family. |
Single | size | The size. |
Returns
Type | Description |
---|---|
Font | Returns instance of the Font from the current collection. |
CreateFont(FontFamily, Single, FontStyle)
Create a new instance of the Font for the named font family.
Declaration
public static Font CreateFont(this FontFamily fontFamily, float size, FontStyle style)
Parameters
Type | Name | Description |
---|---|---|
FontFamily | fontFamily | The family. |
Single | size | The size. |
FontStyle | style | The style. |
Returns
Type | Description |
---|---|
Font | Returns instance of the Font from the current collection. |