New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SvgFontManager fails to initialize if multiple fonts of the same name exist #452
Comments
Reading up about font names, it looks as if it is allowed to have several fonts with the same name, as long as they have different weight and/or style. |
Actually, this has been introduced with the recent introduction of the font manager - before that |
@chucker - I think this can be closed. As I wrote, I do not consider your fix a workaround, as it shouldn't matter for the usage if there is more than one font for the name. |
(This may be a platform-specific quirk in .NET Standard. It's not clear to me from the description of https://docs.microsoft.com/en-us/dotnet/api/system.drawing.fontfamily.families?view=netframework-4.8 what happens if two fonts of the same name exist — it could be that this isn't possible in Windows but is in macOS.)
The type initializer in
SvgFontManager
creates a dictionary by font name. If names aren't unique, this will throw:This breaks the test
LargeEmbeddedImageTest
and possibly others on my machine.The text was updated successfully, but these errors were encountered: