Dashboard/Dashboard.Media.Defaults/FreeTypeFontFactory.cs

24 lines
508 B
C#
Raw Permalink Normal View History

2024-05-27 20:49:25 +02:00
using System.Diagnostics.CodeAnalysis;
using System.IO;
2024-07-17 22:18:20 +02:00
using Dashboard.PAL;
2024-05-27 20:49:25 +02:00
2024-07-17 22:18:20 +02:00
namespace Dashboard.Media.Defaults
2024-05-27 20:49:25 +02:00
{
public class FreeTypeFontFactory : IFontFactory
{
public bool TryOpen(Stream stream, [NotNullWhen(true)] out QFont font)
{
try
{
font = new QFontFreeType(stream);
return true;
}
catch
{
font = null;
return false;
}
}
}
}