Class LocalFontStorage
Namespace: Aurigma.DesignAtoms.Services.Fonts
Assembly: Aurigma.DesignAtoms.dll
Syntax
public class LocalFontStorage : IManagedFontStorage, IFontStorage, IDisposable
Inheritance: System.Object -> LocalFontStorage
Implements
- Aurigma.DesignAtoms.IManagedFontStorage
- Aurigma.DesignAtoms.IFontStorage
System.IDisposable
Inherited Members
System.Object.ToStringSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.ReferenceEquals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseClone
Constructors
LocalFontStorage
public LocalFontStorage(IConfiguration configuration)
LocalFontStorage
public LocalFontStorage(string fontDirectory)
Methods
AddFontFile
public void AddFontFile(string path, string fileName, Stream stream, bool overwrite)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | path | |
System.String | fileName | |
System.IO.Stream | stream | |
System.Boolean | overwrite |
RemoveFontFile
public bool RemoveFontFile(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | filePath |
Returns
System.Boolean
RemoveFontDirectory
public bool RemoveFontDirectory(string directoryPath)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | directoryPath |
Returns
System.Boolean
IsFontFileExists
public bool IsFontFileExists(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | filePath |
Returns
System.Boolean
IsFontDirectoryExists
public bool IsFontDirectoryExists(string folderPath)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | folderPath |
Returns
System.Boolean
GetFontStreamByPath
public Task<Stream> GetFontStreamByPath(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | filePath |
Returns
System.Threading.Tasks.Task<System.IO.Stream>
GetFontFoldersByPath
public IEnumerable<string> GetFontFoldersByPath(string folderPath, bool includeSubfolders)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | folderPath | |
System.Boolean | includeSubfolders |
Returns
System.Collections.Generic.IEnumerable<System.String>
GetFontFilesByPathAsync
public Task<IEnumerable<string>> GetFontFilesByPathAsync(string path, bool includeSubfolders)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | path | |
System.Boolean | includeSubfolders |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>>
GetFontFilesAsync
public Task<IEnumerable<string>> GetFontFilesAsync(string path, bool includeSubfolders)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | path | |
System.Boolean | includeSubfolders |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>>
Dispose
public void Dispose()
Events
FontCollectionChanged
public event EventHandler<EventArgs> FontCollectionChanged