Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.
C# audio-converteravaloniabatch-conversionconvertercsharpdocument-converterdocx-to-pdfdotnetdrag-and-dropfile-conversionfile-converterheic-converterhwphwpximage-converterlinuxmacospdf-convertervideo-converterwindows
Learn .fon in saved libraries with settings schema 47
SeoJCalive2d420944a937
diff --git a/src/Filee.Core/Settings/UserDataStore.cs b/src/Filee.Core/Settings/UserDataStore.csindex 2d23b460..e073ef9f 100644--- a/src/Filee.Core/Settings/UserDataStore.cs+++ b/src/Filee.Core/Settings/UserDataStore.cs@@ -883,9 +883,9 @@ internal static class SettingsMigrationschanged = true;}}- // v47: Garmin FIT activities (.fit) learn the geospatial donut; custom claims stay put.+ // v47: .fit learns the geospatial donut and .fon the fonts donut; custom claims stay put.if (from < 47)- changed |= LearnExtensions(profiles, out _, ["fit"]);+ changed |= LearnExtensions(profiles, out _, ["fit", "fon"]);return changed;}diff --git a/tests/Filee.Core.Tests/FonFormatTests.cs b/tests/Filee.Core.Tests/FonFormatTests.csindex eeb47a89..69b49b03 100644--- a/tests/Filee.Core.Tests/FonFormatTests.cs+++ b/tests/Filee.Core.Tests/FonFormatTests.cs@@ -1,8 +1,9 @@-// Windows bitmap fonts (issue #177): .fon is a read-only font format; a new library's fonts donut takes it.+// Windows bitmap fonts (issue #177): .fon is a read-only font format; new and migrated libraries' fonts donut takes it.using Filee.Core.Formats;using Filee.Core.Presets;using Filee.Core.Profiles;+using Filee.Core.Settings;namespace Filee.Core.Tests;@@ -33,4 +34,34 @@ public class FonFormatTestsAssert.Equal(["eot", "otf", "ttf", "woff", "woff2"], targets);Assert.All(targets, t => Assert.True(FormatRegistry.Known.Single(f => f.Id == t).Writable));}++ [Fact]+ public void Version_46_libraries_learn_fon_once()+ {+ var presets = BuiltInData.CreatePresets();+ var profiles = BuiltInData.CreateProfiles();+ var fonts = profiles.Single(p => p.Id == "fonts");+ fonts.Extensions.Remove("fon");++ Assert.True(SettingsMigrations.ApplyToLibrary(46, presets, profiles));++ Assert.Contains("fon", fonts.Extensions);+ Assert.Equal("fonts", ProfileSelector.Select(profiles, ["Fixed.fon"])?.Id);+ Assert.False(SettingsMigrations.ApplyToLibrary(46, presets, profiles));+ }++ [Fact]+ public void Version_46_migration_keeps_a_custom_fon_claim()+ {+ var presets = BuiltInData.CreatePresets();+ var profiles = BuiltInData.CreateProfiles();+ var fonts = profiles.Single(p => p.Id == "fonts");+ fonts.Extensions.Remove("fon");+ profiles.Insert(0, new ToolbarProfile { Id = "retro", Extensions = ["fon"] });++ SettingsMigrations.ApplyToLibrary(46, presets, profiles);++ Assert.DoesNotContain("fon", fonts.Extensions);+ Assert.Equal("retro", ProfileSelector.Select(profiles, ["Fixed.fon"])?.Id);+ }}