Class IReadonlyFontCollectionExtensions
A readonly collection of fonts.
Inherited Members
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public static class IReadonlyFontCollectionExtensions
Methods
| Improve this Doc View SourceCreateFont(IReadOnlyFontCollection, String, CultureInfo, Single)
Create a new instance of the Font for the named font family with regular styling.
Declaration
public static Font CreateFont(this IReadOnlyFontCollection collection, string fontFamily, CultureInfo culture, float size)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyFontCollection | collection | The the ont collection to retrieve the font family from. |
| String | fontFamily | The family. |
| CultureInfo | culture | The culture of the retuend font family |
| Single | size | The size. |
Returns
| Type | Description |
|---|---|
| Font | The font for the representing the configured options. |
CreateFont(IReadOnlyFontCollection, String, CultureInfo, Single, FontStyle)
Create a new instance of the Font for the named font family.
Declaration
public static Font CreateFont(this IReadOnlyFontCollection collection, string fontFamily, CultureInfo culture, float size, FontStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyFontCollection | collection | The the ont collection to retrieve the font family from. |
| String | fontFamily | The family. |
| CultureInfo | culture | The culture of the retuend font family |
| Single | size | The size. |
| FontStyle | style | The style. |
Returns
| Type | Description |
|---|---|
| Font | The font for the representing the configured options. |
CreateFont(IReadOnlyFontCollection, String, Single)
Create a new instance of the Font for the named font family with regular styling.
Declaration
public static Font CreateFont(this IReadOnlyFontCollection collection, string fontFamily, float size)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyFontCollection | collection | The the ont collection to retrieve the font family from. |
| String | fontFamily | The family. |
| Single | size | The size. |
Returns
| Type | Description |
|---|---|
| Font | The font for the representing the configured options. |
CreateFont(IReadOnlyFontCollection, String, Single, FontStyle)
Create a new instance of the Font for the named font family.
Declaration
public static Font CreateFont(this IReadOnlyFontCollection collection, string fontFamily, float size, FontStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyFontCollection | collection | The the ont collection to retrieve the font family from. |
| String | fontFamily | The family. |
| Single | size | The size. |
| FontStyle | style | The style. |
Returns
| Type | Description |
|---|---|
| Font | The font for the representing the configured options. |