Font Http Client
Minimal HTTP abstraction used by the library to download font files and the Google Fonts directory.
A zero-dependency JDK-backed implementation is used on the JVM by default, and an NSURLSession-backed one on iOS. A Ktor-backed implementation ships in the googlefonts-ktor module and can be injected via GoogleFonts.httpClient.
Implementations must be safe to call from multiple coroutines concurrently, since fonts may be downloaded in parallel.
val client = FontHttpClient { url -> myCache.getOrFetch(url) }Content copied to clipboard