Dashboard/Quik.Media.Defaults/FreeTypeFontFactory.cs

24 lines
498 B
C#

using System.Diagnostics.CodeAnalysis;
using System.IO;
using Quik.PAL;
namespace Quik.Media.Defaults
{
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;
}
}
}
}