fontBytesFromFileOrUrl

fun fontBytesFromFileOrUrl(fileOrUrl: String, cacheDirectory: File = fontCacheDirectory): ByteArray(source)

Read font bytes from a file or url.

Fonts loaded from http(s) urls are cached on disk in cacheDirectory, so they are only downloaded once. Set the org.openrndr.fontcache system property to false to disable the disk cache. data: urls are decoded, base64 or percent-encoded. WOFF and WOFF2 fonts are decoded to TrueType or OpenType fonts.