Releases: rwbutler/TypographyKit
TypographyKit 5.0.0
What's new in TypographyKit 5.0.0?
-
First-class support for SwiftUI colors - to obtain a color, use
TK.color(named:). -
You may specify a fallback color to be used in the event that you forget to define a color. Use the
fallback-colorkey to specify which color should be used in this case.- Setting:
fallback-color - Default: Black in light mode and white in dark mode.
- Setting:
-
You may specify a development color which is used in the event that you forget to define a color in development builds. This color may be different from the fallback color. For example, you may want to use an easily noticeable color such as red to make it visually clear that you have forgotten to define a color in development builds. However, you may want to ensure that this red color will never be shown in production builds - this is why development colors will never be shown in production builds (instead the fallback color will be used).
-
Setting:
development-color -
Default:
red -
Setting:
is-development -
Default:
truein #DEBUG builds;falseotherwise -
Setting:
should-use-development-colors -
Default:
true
-
-
You may optionally specify that your development app builds crash if you forget to define a color. This makes it even less likely that you will forget to specify a color value during development. This setting only affects development builds so there is no need to worry that production builds might crash.
- Setting:
should-crash-if-color-not-found - Default:
false
- Setting:
-
To start using the framework, now
import TypographyKitand then configure as follows:
TypographyKit.configure(
with: TypographyKitConfiguration.default
.setConfigurationURL(configurationURL)
)Alternatively, an async version of this method exists for developers supporting iOS 13 and above:
await TypographyKit.configure(with:
TypographyKitConfiguration.default.setConfigurationURL(configurationURL)
)- All configuration properties specified programmatically may alternatively be specified in the TypographyKit configuration file.
- Note: Values in the configuration file override those specified programmatically.
For a detailed list of changes, see CHANGELOG.md.
TypographyKit 5.0.0-alpha3
- Fixed a availability check for iOS 13 on async methods.
TypographyKit 5.0.0-alpha2
[5.0.0] - 2023-02-07
Added
- Added async configuration & refresh methods, allowing the caller to await the result i.e.
TypographyKitSettings.
Changed
- Deprecated setting the
configurationURLproperty directly. Replaced with new configuration methods with a completion closure for use on iOS 11 & 12.
TypographyKit 5.0.0-alpha1
[5.0.0] - 2023-01-31
Added
- Properties
colorandswiftUIallow a SwiftUIColorto be obtained from aTypographyKitColor. - All methods & properties previously accessed using
TypographyKit.may now be accessed using the shortened form:TK.. - Support for RGBA colour values e.g. rgba(255,255,255,255).
- Support for hexadecimal color values with transparency e.g. #FFFFFFFF.
Changed
TypographyKit.colorsshould no longer be used. Instead use:- For SwiftUI:
TypographyKit.color(named:)orTK.color(named:). - For UIKit:
TypographyKit.uiColor(named:)orTK.uiColor(named:). - Or:
TypographyKit.tkColor(named:).color(for SwiftUI) orTypographyKit.tkColor(named:).uiColor(for UIKit).
- For SwiftUI:
ConfigurationSettingsrenamed toTypographyKitConfiguration. This object contains the configuration values supplied by the developer (along with any default configuration values).TypgraphyKitConfigurationrenamed toTypographyKitSettings. This object contains the current configuration as well as loaded colors and typography styles.
TypographyKit 4.4.0
[4.4.0] - 2022-08-16
Changed
- When using the View modifier in SwiftUI, the scaling mode can be specified as a parameter e.g.
.typography(style: .interactive, scalingMode: .fontMetrics). By default the scaling mode specified in the configuration will be applied.
TypographyKit 4.3.2
[4.3.2] - 2022-03-16
Changed
- Fixed an issue concerning font colors in SwiftUI.
TypographyKit 4.3.1
[4.3.1] - 2021-11-09
Changed
- Allow Color and Font for typography styles in SwiftUI to be nullable.
TypographyKit 4.3.0
[4.3.0] - 2021-11-09
Added
- Support for disabling font scaling either system-wide and/or per-font.
- Support for custom letter spacing in font styles plist.
Credit to @jacob-jennings and @loadex for this.
TypographyKit v4.2.2
Changed
- Removes a warning relating to iOS 8 being unsupported as a deployment target in Xcode 12 (thanks to @atrinh0).
TypographyKit v4.2.1
Changed
Fixes support for Swift Package Manager by making TypographyKitViewController and TypographyKitColorsViewController programmatic over using storyboards & xibs.