Hello,
I'm discovering Typography project, and i'm happy with this, i'm may be wrong with something, but it seem there is an issue with register function.
When I'm adding Windows font folder in Collection, duplicate handler callback is called severals times with non duplicate font
example from my console testing program, arial and arial narrow
opening : C:\Windows\Fonts
is_directory
duplicate font :
keep : Arial C:\Windows\Fonts\arial.ttf
discard : Arial Narrow C:\Windows\Fonts\ARIALN.TTF
i checked if there is any mistake in file naming but no, you can reproduce issue on windows
string filepath = "C:\Windows\Fonts";
var fontCollection = new FontCollections.InstalledTypefaceCollection();
fontCollection.SetFontNameDuplicatedHandler((f1, f2) => {
Console.WriteLine("duplicate font :");
Console.WriteLine(" keep : {0} {1}", f1.FontName, f1.FontPath);
Console.WriteLine(" discard : {0} {1}", f2.FontName, f2.FontPath);
Console.WriteLine("");
return FontNameDuplicatedDecision.Skip;
});
Typography.FontCollections.InstalledTypefaceCollectionExtensions.LoadFontsFromFolder(fontCollection, filepath);
may it's be good to have a chain starting with comparing UniqueFontIden and then fallback to less sementically revelents parameters ?
Hello,
I'm discovering Typography project, and i'm happy with this, i'm may be wrong with something, but it seem there is an issue with register function.
When I'm adding Windows font folder in Collection, duplicate handler callback is called severals times with non duplicate font
example from my console testing program, arial and arial narrow
i checked if there is any mistake in file naming but no, you can reproduce issue on windows
may it's be good to have a chain starting with comparing
UniqueFontIdenand then fallback to less sementically revelents parameters ?