WIP: fonts.

This commit is contained in:
2023-06-20 00:18:35 +02:00
parent 72b6896d3e
commit 193462b747
11 changed files with 79 additions and 9 deletions

View File

@@ -4,13 +4,16 @@ public class FontLoader : IResourceLoader
{
public IEnumerable<string> SupportedExtensions => new string[]
{
".ttf"
"ttf"
};
public Type ResourceType => typeof(Font);
public Resource Load(string path)
{
return default;
byte[] fileBuffer = File.ReadAllBytes(path);
var result = new Font(path, fileBuffer);
result.BufferSize = fileBuffer.Length;
return result;
}
}