-
Notifications
You must be signed in to change notification settings - Fork 286
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
Error when importing two fonts of the same family #178
Comments
Yep, this is kind of "expected" behavior, although not really the one that is preferable. There definitely should be done something about it, but I am not yet sure how to handle this.
One way to handle this would be to keep a PrivateFontCollection for each Font, or instantiate it temporarily and get rid of it again later. Will need to investigate whether this is a good solution. |
Hmm.. I understand where this is coming from. Maybe it could be enough to put an appropriate warning message if the PrivateFontCollection already contains the Family of the new font. Something like "Cannot import this font now, please restart to rebuild font cache." EDIT |
I'm sure there must be a way to do this properly - I'm just not sure, which one it is yet. In any case, thanks for pointing this out. :) It's bad usability and it needs to be addressed. |
This should be addressed in the course of getting rid of System.Drawing in v2.0 and making Duality Fonts full bitmap fonts. |
This has been fixed in the course of the above mentioned issue. Closing this. |
Following the conversation here, I made a couple tests and I found that if you import a font inside Duality, remove the font, then try to import the same font or even another in the same family, Duality will refuse to import the file with a generic "file type not supported" error message.
(for this test I have used 'Arial Black' and 'Arial Italic' from the Windows' Font directory)
How to reproduce:
Restarting the editor fixes the issue, until you do it again :)
The text was updated successfully, but these errors were encountered: