Browse Source
Co-authored-by: Jan Kučera <miloush@users.noreply.github.com> Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>pull/19583/head
committed by
GitHub
5 changed files with 101 additions and 2 deletions
@ -0,0 +1,20 @@ |
|||
using System; |
|||
using System.ComponentModel; |
|||
using System.Globalization; |
|||
using Avalonia.Media; |
|||
|
|||
namespace TextTestApp |
|||
{ |
|||
public class FontFeatureCollectionConverter : TypeConverter |
|||
{ |
|||
public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) |
|||
{ |
|||
return sourceType == typeof(string); |
|||
} |
|||
|
|||
public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value) |
|||
{ |
|||
return FontFeatureCollection.Parse((string)value); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue