Class SkiaSharpExtensions
Extension methods for SkiaSharp types
Inherited Members
Namespace: OpenSvg
Assembly: OpenSvg.dll
Syntax
public static class SkiaSharpExtensions
Methods
| Edit this page View SourceLoadFromFile(string)
Loads a SKTypeface font from the specified file path.
Declaration
public static SKTypeface LoadFromFile(this string fontFilePath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fontFilePath | The file path of the font. |
Returns
| Type | Description |
|---|---|
| SKTypeface | The loaded SKTypeface font. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
| FileNotFoundException | Thrown when the font file is not found. |
| InvalidOperationException | Thrown when the font fails to load from the file path. |
SaveToFile(SKTypeface, string)
Saves the specified SKTypeface font to a file
Declaration
public static void SaveToFile(this SKTypeface font, string fontFilePath)
Parameters
| Type | Name | Description |
|---|---|---|
| SKTypeface | font | The SKTypeface font. |
| string | fontFilePath | The file path of the font. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
| InvalidOperationException | Thrown if not all the data font from the font can be read. |