diff --git a/Qwilight/Compiler/BMSCompiler.cs b/Qwilight/Compiler/BMSCompiler.cs index 7e45e94..91a60a2 100644 --- a/Qwilight/Compiler/BMSCompiler.cs +++ b/Qwilight/Compiler/BMSCompiler.cs @@ -725,28 +725,25 @@ targetComputing.IsHellBPM = targetComputing.TrapNotes > 0; } - public override void CompileImpl(DefaultCompute defaultComputer, byte[] noteFileContents) + public override void CompileImpl(DefaultCompute defaultComputer, byte[] noteFileContents, bool loadParallelItems) { var bmsIDAudioItemMap = new ConcurrentDictionary(); var bmsIDHandledItemMap = new ConcurrentDictionary(); var parallelItems = new ConcurrentBag(); - if (defaultComputer.LoadContents) + try { - try + var noteDrawingPath = Utility.GetAvailable(defaultComputer.NoteDrawingPath, Utility.AvailableFlag.Drawing); + if (!string.IsNullOrEmpty(noteDrawingPath)) { - var noteDrawingPath = Utility.GetAvailable(defaultComputer.NoteDrawingPath, Utility.AvailableFlag.Drawing); - if (!string.IsNullOrEmpty(noteDrawingPath)) + defaultComputer.NoteHandledDrawingItem = new HandledDrawingItem { - defaultComputer.NoteHandledDrawingItem = new HandledDrawingItem - { - Drawing = DrawingSystem.Instance.Load(noteDrawingPath, defaultComputer), - DefaultDrawing = DrawingSystem.Instance.LoadDefault(noteDrawingPath, defaultComputer) - }; - } + Drawing = DrawingSystem.Instance.Load(noteDrawingPath, defaultComputer), + DefaultDrawing = DrawingSystem.Instance.LoadDefault(noteDrawingPath, defaultComputer) + }; } - catch - { - } + } + catch + { } var isBanalMedia = (!_hasMedia || defaultComputer.AlwaysBanalMedia) && defaultComputer.BanalMedia; var isBanalFailedMedia = (!_hasFailedMedia || defaultComputer.AlwaysBanalFailedMedia) && defaultComputer.BanalFailedMedia; @@ -822,7 +819,7 @@ } } - if (defaultComputer.LoadContents) + if (loadParallelItems) { var endStatus = parallelItems.Count; var status = 0; diff --git a/Qwilight/Compiler/BMSONCompiler.cs b/Qwilight/Compiler/BMSONCompiler.cs index f09de3e..03b53e2 100644 --- a/Qwilight/Compiler/BMSONCompiler.cs +++ b/Qwilight/Compiler/BMSONCompiler.cs @@ -500,28 +500,25 @@ targetComputing.IsHellBPM = targetComputing.TrapNotes > 0; } - public override void CompileImpl(DefaultCompute defaultComputer, byte[] noteFileContents) + public override void CompileImpl(DefaultCompute defaultComputer, byte[] noteFileContents, bool loadParallelItems) { var audioFileNameAudioItemMap = new ConcurrentDictionary(); var mediaIDHandledItemMap = new ConcurrentDictionary(); var parallelItems = new ConcurrentBag(); - if (defaultComputer.LoadContents) + try { - try + var noteDrawingPath = Utility.GetAvailable(defaultComputer.NoteDrawingPath, Utility.AvailableFlag.Drawing); + if (!string.IsNullOrEmpty(noteDrawingPath)) { - var noteDrawingPath = Utility.GetAvailable(defaultComputer.NoteDrawingPath, Utility.AvailableFlag.Drawing); - if (!string.IsNullOrEmpty(noteDrawingPath)) + defaultComputer.NoteHandledDrawingItem = new HandledDrawingItem { - defaultComputer.NoteHandledDrawingItem = new HandledDrawingItem - { - Drawing = DrawingSystem.Instance.Load(noteDrawingPath, defaultComputer), - DefaultDrawing = DrawingSystem.Instance.LoadDefault(noteDrawingPath, defaultComputer) - }; - } + Drawing = DrawingSystem.Instance.Load(noteDrawingPath, defaultComputer), + DefaultDrawing = DrawingSystem.Instance.LoadDefault(noteDrawingPath, defaultComputer) + }; } - catch - { - } + } + catch + { } var isBanalMedia = (!_hasMedia || defaultComputer.AlwaysBanalMedia) && defaultComputer.BanalMedia; defaultComputer.LoadBanalMedia(isBanalMedia, defaultComputer.BanalFailedMedia, parallelItems); @@ -573,7 +570,7 @@ } } - if (defaultComputer.LoadContents) + if (loadParallelItems) { var endStatus = parallelItems.Count; var status = 0; diff --git a/Qwilight/Compiler/BaseCompiler.cs b/Qwilight/Compiler/BaseCompiler.cs index b267f3c..5c60f71 100644 --- a/Qwilight/Compiler/BaseCompiler.cs +++ b/Qwilight/Compiler/BaseCompiler.cs @@ -38,7 +38,7 @@ public abstract void CompileImpl(Computing targetComputing, byte[] noteFileContents, int salt); - public abstract void CompileImpl(DefaultCompute defaultComputer, byte[] noteFileContents); + public abstract void CompileImpl(DefaultCompute defaultComputer, byte[] noteFileContents, bool loadParallelItems); public Dictionary WaitBPMMap { get; } = new(); @@ -187,7 +187,7 @@ targetComputing.AssistFileName = Path.GetFileName(Utility.GetFiles(NoteFile.EntryItem.EntryPath).FirstOrDefault(filePath => filePath.IsTailCaselsss(".txt") && filePath.ContainsCaselsss("README"))); } - public void Compile(DefaultCompute defaultComputer) + public void Compile(DefaultCompute defaultComputer, bool loadParallelItems) { try { @@ -195,7 +195,7 @@ { defaultComputer.NoteFileContents = NoteFile.GetContents(); HandleCompile(defaultComputer, defaultComputer.NoteFileContents, defaultComputer.ModeComponentValue.Salt); - HandleCompile(defaultComputer, defaultComputer.NoteFileContents); + HandleCompile(defaultComputer, defaultComputer.NoteFileContents, loadParallelItems); OnCompiled(defaultComputer); defaultComputer.OnCompiled(); } @@ -222,9 +222,9 @@ } } - void HandleCompile(DefaultCompute defaultComputer, byte[] noteFileContents) + void HandleCompile(DefaultCompute defaultComputer, byte[] noteFileContents, bool loadParallelItems) { - CompileImpl(defaultComputer, noteFileContents); + CompileImpl(defaultComputer, noteFileContents, loadParallelItems); if (defaultComputer.IsLongNoteStand1) { defaultComputer.TotalNotes = Notes.Sum(note => note.HasStand ? 1 : 0); diff --git a/Qwilight/Component.cs b/Qwilight/Component.cs index 2804447..1a9219b 100644 --- a/Qwilight/Component.cs +++ b/Qwilight/Component.cs @@ -22,6 +22,7 @@ Not = -1, Highest, Higher, High, Low, Lower, Lowest, Band1 = 9, Last = 10 } + public const double StandardLength = 1280.0; public const double StandardHeight = 720.0; public const double StandardBPM = 130.0; public const int StandardMeter = 192; diff --git a/Qwilight/Compute/DefaultCompute.cs b/Qwilight/Compute/DefaultCompute.cs index 85f0e1c..6d92e2f 100644 --- a/Qwilight/Compute/DefaultCompute.cs +++ b/Qwilight/Compute/DefaultCompute.cs @@ -395,8 +395,6 @@ public Event.Types.DrawingComponent NetDrawingComponentValue { get; set; } - public virtual bool LoadContents => true; - public virtual bool CanPause => WwwLevelDataValue?.AllowPause != false; public virtual bool CanUndo => WwwLevelDataValue?.AllowPause != false; @@ -1545,7 +1543,7 @@ _standModeDate = Utility.IsLowerDate(date, 1, 6, 7) ? Component.StandMode100 : Utility.IsLowerDate(date, 1, 14, 118) ? Component.StandMode167 : Component.StandMode114118; _tooLongLongNoteDate = Utility.IsLowerDate(date, 1, 13, 107) ? Component.TooLongLongNote100 : Utility.IsLowerDate(date, 1, 14, 20) ? Component.TooLongLongNote113107 : Utility.IsLowerDate(date, 1, 14, 29) ? Component.TooLongLongNote11420 : Component.TooLongLongNote11429; _targetCompiler = BaseCompiler.GetCompiler(NoteFile, _setCancelCompiler); - _targetCompilerHandler = Utility.GetParallelHandler(() => _targetCompiler.Compile(this)); + _targetCompilerHandler = Utility.GetParallelHandler(() => _targetCompiler.Compile(this, true)); CommentWaitDate = Utility.IsLowerDate(date, 1, 3, 11) ? Component.CommentWaitDate100 : Utility.IsLowerDate(date, 1, 6, 4) ? Component.CommentWaitDate1311 : Component.CommentWaitDate164; HandleWarning(); } diff --git a/Qwilight/Compute/TestCompute.cs b/Qwilight/Compute/TestCompute.cs deleted file mode 100644 index 3d71ee0..0000000 --- a/Qwilight/Compute/TestCompute.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Qwilight.NoteFile; - -namespace Qwilight.Compute -{ - public sealed class TestCompute : DefaultCompute - { - public TestCompute(BaseNoteFile noteFile) : base(new[] { noteFile }, null, null, string.Empty, string.Empty) - { - } - - public override bool LoadContents => false; - - public override void OnCompiled() - { - } - } -} \ No newline at end of file diff --git a/Qwilight/Note/InputNote.cs b/Qwilight/Note/InputNote.cs index 9047f72..b242379 100644 --- a/Qwilight/Note/InputNote.cs +++ b/Qwilight/Note/InputNote.cs @@ -119,7 +119,7 @@ if (inputNoteDrawing.HasValue) { targetSession.PaintDrawing(ref r, inputNoteDrawing, GetFaint(modeComponentValue, drawingComponentValue.judgmentMainPosition, defaultComputer.FaintCosine)); - defaultComputer.NewNetDrawing(isValidNetDrawings, Event.Types.NetDrawing.Types.Variety.Note, inputNoteDrawing.Value.AverageColor, r.Position0 - drawingComponentValue.mainPosition, r.Position1, r.Length, r.Height * inputNoteDrawing.Value.StandardHeight); + defaultComputer.NewNetDrawing(isValidNetDrawings, Event.Types.NetDrawing.Types.Variety.Note, inputNoteDrawing.Value.AverageColor, r.Position0 - drawingComponentValue.mainPosition, r.Position1, r.Length, r.Height * inputNoteDrawing.Value.AverageHeight); } if (PostableItemValue != null) { diff --git a/Qwilight/Note/LongNote.cs b/Qwilight/Note/LongNote.cs index 817f0dd..03d951b 100644 --- a/Qwilight/Note/LongNote.cs +++ b/Qwilight/Note/LongNote.cs @@ -153,7 +153,7 @@ if (longNoteDrawing.HasValue) { targetSession.PaintDrawing(ref r, longNoteDrawing, faint); - defaultComputer.NewNetDrawing(isValidNetDrawings, Event.Types.NetDrawing.Types.Variety.Note, longNoteDrawing.Value.AverageColor, r.Position0 - drawingComponentValue.mainPosition, r.Position1, r.Length, r.Height * longNoteDrawing.Value.StandardHeight); + defaultComputer.NewNetDrawing(isValidNetDrawings, Event.Types.NetDrawing.Types.Variety.Note, longNoteDrawing.Value.AverageColor, r.Position0 - drawingComponentValue.mainPosition, r.Position1, r.Length, r.Height * longNoteDrawing.Value.AverageHeight); } if (PostableItemValue != null) { diff --git a/Qwilight/Note/TrapNote.cs b/Qwilight/Note/TrapNote.cs index 3309ba4..297e8c7 100644 --- a/Qwilight/Note/TrapNote.cs +++ b/Qwilight/Note/TrapNote.cs @@ -67,7 +67,7 @@ if (trapNoteDrawing.HasValue) { targetSession.PaintDrawing(ref r, trapNoteDrawing, GetFaint(modeComponentValue, drawingComponentValue.judgmentMainPosition, defaultComputer.FaintCosine)); - defaultComputer.NewNetDrawing(isValidNetDrawings, Event.Types.NetDrawing.Types.Variety.Note, trapNoteDrawing.Value.AverageColor, r.Position0 - drawingComponentValue.mainPosition, r.Position1, r.Length, r.Height * trapNoteDrawing.Value.StandardHeight); + defaultComputer.NewNetDrawing(isValidNetDrawings, Event.Types.NetDrawing.Types.Variety.Note, trapNoteDrawing.Value.AverageColor, r.Position0 - drawingComponentValue.mainPosition, r.Position1, r.Length, r.Height * trapNoteDrawing.Value.AverageHeight); } } } diff --git a/Qwilight/System/BaseUI/BaseUI.cs b/Qwilight/System/BaseUI/BaseUI.cs index 82c1852..d222927 100644 --- a/Qwilight/System/BaseUI/BaseUI.cs +++ b/Qwilight/System/BaseUI/BaseUI.cs @@ -750,8 +750,8 @@ lsCaller.DoString(File.ReadAllText(luaFilePath, Encoding.UTF8)); } - DefaultLength = GetCalledValue(formatNode, "defaultLength", "1280.0"); - DefaultHeight = GetCalledValue(formatNode, "defaultHeight", "720.0"); + DefaultLength = GetCalledValue(formatNode, "defaultLength", Component.StandardLength.ToString()); + DefaultHeight = GetCalledValue(formatNode, "defaultHeight", Component.StandardHeight.ToString()); SiteDateColor = Utility.ModifyColor(GetCalledText(Utility.GetText(paintNode, "siteDate", nameof(Colors.White))).GetColor()); SiteEnterColor = Utility.ModifyColor(GetCalledText(Utility.GetText(paintNode, "siteEnter", nameof(Colors.White))).GetColor()); @@ -2050,8 +2050,8 @@ ModeComponentDrawings[ModifyModeComponentViewModel.WaveModeVariety] = new HandledDrawingItem?[2]; ModeComponentDrawings[ModifyModeComponentViewModel.SetNoteModeVariety] = new HandledDrawingItem?[4]; ModeComponentDrawings[ModifyModeComponentViewModel.LowestJudgmentConditionModeVariety] = new HandledDrawingItem?[2]; - DefaultLength = 1280.0; - DefaultHeight = 720.0; + DefaultLength = Component.StandardLength; + DefaultHeight = Component.StandardHeight; EventNoteNameFontLevel = Levels.FontLevel0; TitleFontLevel = Levels.FontLevel0; ArtistFontLevel = Levels.FontLevel0; diff --git a/Qwilight/System/DrawingSystem/DrawingItem.cs b/Qwilight/System/DrawingSystem/DrawingItem.cs index cf74d75..a2574f4 100644 --- a/Qwilight/System/DrawingSystem/DrawingItem.cs +++ b/Qwilight/System/DrawingSystem/DrawingItem.cs @@ -10,7 +10,7 @@ public uint AverageColor { get; set; } - public double StandardHeight { get; set; } + public double AverageHeight { get; set; } public void Dispose() => Drawing.Dispose(); } diff --git a/Qwilight/System/DrawingSystem/DrawingSystem.cs b/Qwilight/System/DrawingSystem/DrawingSystem.cs index 9ecc8e0..7ded025 100644 --- a/Qwilight/System/DrawingSystem/DrawingSystem.cs +++ b/Qwilight/System/DrawingSystem/DrawingSystem.cs @@ -3036,7 +3036,7 @@ } } - public virtual void SetFaintPaints(IDrawingContainer drawingContainer, ICanvasBrush[] faintPaints, Color faintColor) + public void SetFaintPaints(IDrawingContainer drawingContainer, ICanvasBrush[] faintPaints, Color faintColor) { for (var i = faintPaints.Length - 1; i >= 0; --i) { @@ -3254,7 +3254,7 @@ Drawing = drawing, DrawingBound = drawing.Bounds, AverageColor = averageColor, - StandardHeight = averageHeight + AverageHeight = averageHeight }; } @@ -3522,14 +3522,14 @@ SetFontLevel(StatusViewFont, Levels.FontLevel0Float32); } - public virtual CanvasTextFormat GetFont() => new() + public CanvasTextFormat GetFont() => new() { WordWrapping = CanvasWordWrapping.NoWrap }; - public virtual void SetFontLevel(CanvasTextFormat font, float fontLevel) => font.FontSize = fontLevel; + public void SetFontLevel(CanvasTextFormat font, float fontLevel) => font.FontSize = fontLevel; - public virtual void SetFontSystem(CanvasTextFormat font, int fontSystem0, int fontSystem1) + public void SetFontSystem(CanvasTextFormat font, int fontSystem0, int fontSystem1) { font.HorizontalAlignment = fontSystem0 switch { @@ -3547,6 +3547,6 @@ }; } - public virtual void SetFontFamily(CanvasTextFormat font) => font.FontFamily = Configure.Instance.FontFamilyValues[3].ToString(); + public void SetFontFamily(CanvasTextFormat font) => font.FontFamily = Configure.Instance.FontFamilyValues[3].ToString(); } } \ No newline at end of file diff --git a/Qwilight/System/TelnetSystem/DefaultTelnetSystem.cs b/Qwilight/System/TelnetSystem/DefaultTelnetSystem.cs index 9501d2a..dc8eb25 100644 --- a/Qwilight/System/TelnetSystem/DefaultTelnetSystem.cs +++ b/Qwilight/System/TelnetSystem/DefaultTelnetSystem.cs @@ -139,8 +139,11 @@ { Console.WriteLine(noteFile.NoteFilePath); var targetCompiler = BaseCompiler.GetCompiler(noteFile, null); - var defaultComputer = new TestCompute(noteFile); - targetCompiler.Compile(defaultComputer); + var defaultComputer = new DefaultCompute(new[] { noteFile }, null, null, string.Empty, string.Empty) + { + IsSilent = true + }; + targetCompiler.Compile(defaultComputer, false); var noteID = noteFile.GetNoteID512(); noteID = noteID.Substring(0, noteID.IndexOf(':')); File.WriteAllBytes(Path.Combine(fileName, Path.ChangeExtension(noteID, Path.GetExtension(noteFile.NoteFilePath))), noteFile.GetContents()); diff --git a/Qwilight/System/UI/UI.cs b/Qwilight/System/UI/UI.cs index f959ac0..0fe7b90 100644 --- a/Qwilight/System/UI/UI.cs +++ b/Qwilight/System/UI/UI.cs @@ -366,8 +366,8 @@ Script.RunString(UILS); lsCaller.DoString(UILS); - DefaultLength = GetCalledValue(formatNode, "defaultLength", "1280.0"); - DefaultHeight = GetCalledValue(formatNode, "defaultHeight", "720.0"); + DefaultLength = GetCalledValue(formatNode, "defaultLength", Component.StandardLength.ToString()); + DefaultHeight = GetCalledValue(formatNode, "defaultHeight", Component.StandardHeight.ToString()); var setPaintPipelines = Utility.ToBool(Utility.GetText(funcNode, "set-paint-pinelines", bool.FalseString)); foreach (var pipeline in GetCalledText(Utility.GetText(funcNode, "pipeline")).Split(',').Select(value => Utility.ToInt32(value.Trim(), out var pipeline) ? pipeline : 0)) @@ -432,8 +432,8 @@ SaveValueMap(pointNode, "mediaPosition0", 0.0); SaveValueMap(pointNode, "mediaPosition1", 0.0); - SaveValueMap(pointNode, "mediaLength", 1280.0); - SaveValueMap(pointNode, "mediaHeight", 720.0); + SaveValueMap(pointNode, "mediaLength", Component.StandardLength); + SaveValueMap(pointNode, "mediaHeight", Component.StandardHeight); SaveAltMap("alt-media", 0); SaveValueMap(pointNode, "titlePosition0"); @@ -478,8 +478,8 @@ SaveValueMap(pointNode, "audioVisualizerPosition0", 0.0); SaveValueMap(pointNode, "audioVisualizerPosition1", 0.0); - SaveValueMap(pointNode, "audioVisualizerLength", 1280.0); - SaveValueMap(pointNode, "audioVisualizerHeight", 720.0); + SaveValueMap(pointNode, "audioVisualizerLength", Component.StandardLength); + SaveValueMap(pointNode, "audioVisualizerHeight", Component.StandardHeight); DrawingSystem.Instance.SetFontLevel(TitleFont, Utility.ToFloat32(Utility.GetText(fontNode, "titleLevel", QwilightComponent.GetBuiltInFloat64As("FontLevel0")))); DrawingSystem.Instance.SetFontLevel(ArtistFont, Utility.ToFloat32(Utility.GetText(fontNode, "artistLevel", QwilightComponent.GetBuiltInFloat64As("FontLevel0")))); @@ -2181,8 +2181,8 @@ Array.Clear(data, 0, data.Length); } } - DefaultLength = 1280.0; - DefaultHeight = 720.0; + DefaultLength = Component.StandardLength; + DefaultHeight = Component.StandardHeight; _audioItemMap.Clear(); ValueCallMap.Clear(); ValueMap.Clear(); diff --git a/Qwilight/Utilities/ParallelUtility.cs b/Qwilight/Utilities/ParallelUtility.cs index feb8a9e..83d6a5a 100644 --- a/Qwilight/Utilities/ParallelUtility.cs +++ b/Qwilight/Utilities/ParallelUtility.cs @@ -19,10 +19,10 @@ public static void HandleLowlyParallelly(IProducerConsumerCollection parallelItems, int onHandleBin, Action onHandle, CancellationToken? setCancelParallel = null) { - var longParallels = new Thread[onHandleBin]; - for (var i = longParallels.Length - 1; i >= 0; --i) + var ts = new Thread[onHandleBin]; + for (var i = ts.Length - 1; i >= 0; --i) { - var longParallel = new Thread(() => + var t = new Thread(() => { while (setCancelParallel?.IsCancellationRequested != true && parallelItems.TryTake(out var parallelItem)) { @@ -33,10 +33,10 @@ IsBackground = true, Priority = ThreadPriority.Lowest }; - longParallel.Start(); - longParallels[i] = longParallel; + t.Start(); + ts[i] = t; } - foreach (var longParallel in longParallels) + foreach (var longParallel in ts) { longParallel.Join(); } diff --git a/Test/Test/Compiler/CompilerTest.cs b/Test/Test/Compiler/CompilerTest.cs index 8d5a745..4f24fa9 100644 --- a/Test/Test/Compiler/CompilerTest.cs +++ b/Test/Test/Compiler/CompilerTest.cs @@ -25,8 +25,11 @@ }, -1)).ToArray(), noteFile => { var targetCompiler = BaseCompiler.GetCompiler(noteFile, null); - var defaultComputer = new TestCompute(noteFile); - targetCompiler.Compile(defaultComputer); + var defaultComputer = new DefaultCompute(new[] { noteFile }, null, null, string.Empty, string.Empty) + { + IsSilent = true + }; + targetCompiler.Compile(defaultComputer, true); var lines = File.ReadAllLines(Path.ChangeExtension(noteFile.NoteFilePath, ".txt"), Encoding.UTF8); Assert.Equal(defaultComputer.IsAutoLongNote.ToString(), lines[0]); Assert.Equal(defaultComputer.IsBanned.ToString(), lines[1]); diff --git a/Test/Test/Test.cs b/Test/Test/Test.cs index 6c3a88a..263ed28 100644 --- a/Test/Test/Test.cs +++ b/Test/Test/Test.cs @@ -1,11 +1,12 @@ -using Microsoft.Graphics.Canvas.Brushes; -using Microsoft.Graphics.Canvas.Text; +using CommunityToolkit.Mvvm.Messaging; using Microsoft.Windows.ApplicationModel.DynamicDependency; using Moq; using Qwilight; +using Qwilight.MSG; using Qwilight.ViewModel; using System.Text; -using Windows.UI; +using System.Windows.Media; +using Windows.Graphics; using Xunit; namespace Test @@ -30,11 +31,8 @@ var drawingSystem = new Mock(); drawingSystem.Setup(arg => arg.Init()); - drawingSystem.Setup(arg => arg.GetFont()).Returns(new CanvasTextFormat()); - drawingSystem.Setup(arg => arg.SetFaintPaints(It.IsAny(), It.IsAny(), It.IsAny())); - drawingSystem.Setup(arg => arg.SetFontFamily(It.IsAny())); - drawingSystem.Setup(arg => arg.SetFontLevel(It.IsAny(), It.IsAny())); - drawingSystem.Setup(arg => arg.SetFontSystem(It.IsAny(), It.IsAny(), It.IsAny())); + + StrongReferenceMessenger.Default.Register(this, (recipient, message) => message.Reply(new RectInt32(0, 0, (int)Component.StandardLength, (int)Component.StandardHeight))); QwilightComponent.OnGetBuiltInData = data => data switch { @@ -49,6 +47,7 @@ nameof(TwilightSystem) => new TwilightSystem(), nameof(ControllerSystem) => new ControllerSystem(), nameof(MIDISystem) => new MIDISystem(), + "DefaultFontFamily" => new FontFamily(), _ => default };