Skip to content

2.0.0

Choose a tag to compare

@ItzNotABug ItzNotABug released this 18 Oct 08:23
cf59539

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

Full Changelog: v1.1.0...v2.0.0