19 lines
447 B
C#
19 lines
447 B
C#
namespace DaggerFramework.Resources;
|
|
|
|
public class FontLoader : IResourceLoader
|
|
{
|
|
public IEnumerable<string> SupportedExtensions => new string[]
|
|
{
|
|
"ttf"
|
|
};
|
|
|
|
public Type ResourceType => typeof(Font);
|
|
|
|
public Resource Load(string path)
|
|
{
|
|
byte[] fileBuffer = File.ReadAllBytes(path);
|
|
var result = new Font(path, fileBuffer);
|
|
result.BufferSize = fileBuffer.Length;
|
|
return result;
|
|
}
|
|
} |