Repository navigation
2.0.0
load(_:styles:) no longer throws. It returns per-style results, so one missing style doesn't block the rest.
let results = await WebFonts.shared.load("Inter", styles: [.regular, .bold])
if !results.allSucceeded { print(results.failed) }Upgrading: drop the try/catch around load and check the results instead. Failed styles are fetched again on the next load. A cancelled load returns no results.
Also fixes a few edge cases around cancelled and failed loads.
What's Changed
- Load each style on its own by @ItzNotABug in #15
- Fix a leaked job and a missing .loaded after cancellation by @ItzNotABug in #16
- Settle a cancelled load's events style by style by @ItzNotABug in #17
- Retry a style whose install failed by @ItzNotABug in #18
- Release 2.0.0 by @ItzNotABug in #19
Full Changelog: v1.1.0...v2.0.0