You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding named constructors for True/OpenType and Bitmap Fonts that call the proper (now private) constructors will prevent confusion on which to use and will self-document the code.
The text was updated successfully, but these errors were encountered:
You're probably right. They're not well differentiated.
I suppose we could have a constructor taking a FontInfo instead, and factory methods that build a font based on font type. That does raise some validation concerns with the FontInfo struct though, since all fields are public, and they may not all be mutually consistent.
I should also point out that the change won't play well with the current ResourceCache usage, which requires constructors to function. We would need to extend ResourceCache to allow for alternate factory functions before we could really consider making this change for Font.
Adding named constructors for True/OpenType and Bitmap Fonts that call the proper (now private) constructors will prevent confusion on which to use and will self-document the code.
The text was updated successfully, but these errors were encountered: