Previously, a TextStyle had to be constructed with:
TextStyle(font: "Some String", ... )
now I have created a CustomFontenum which takes:
case .system
case .custom(String) // Name of the custom font
and updated the TextStyle
Notes
1) I'm not attached to any of the names, please do suggest improvements
2) It is backwards compatible atm, but wondering if this might work nice to construct TextStyles like:
TextStyle(.system, ...) // or
TextStyle("OpenSans", ...)
it would free up the property named font which I'm having to work around atm to use mappedFont (See files).
TL;DR
New feature to add support for system fonts.
Summary
Previously, a
TextStyle
had to be constructed with:now I have created a
CustomFont
enum
which takes:and updated the
TextStyle
Notes
1) I'm not attached to any of the names, please do suggest improvements 2) It is backwards compatible atm, but wondering if this might work nice to construct
TextStyle
s like:it would free up the property named
font
which I'm having to work around atm to usemappedFont
(See files).