INIT
This commit is contained in:
12
EnvelopeGenerator.ReceiverUI/Services/FontLoader.cs
Normal file
12
EnvelopeGenerator.ReceiverUI/Services/FontLoader.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using DevExpress.Drawing;
|
||||
|
||||
namespace EnvelopeGenerator.ReceiverUI.Services {
|
||||
public static class FontLoader {
|
||||
public async static Task LoadFonts(HttpClient httpClient, List<string> fontNames) {
|
||||
foreach(var fontName in fontNames) {
|
||||
var fontBytes = await httpClient.GetByteArrayAsync($"fonts/{fontName}");
|
||||
DXFontRepository.Instance.AddFont(fontBytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user