getGoogleFont

fun getGoogleFont(family: String, style: String, letterSpacing: Float = 0.0f, lineSpacing: Float = 1.0f, verify: Boolean = false): Font

Get a font from the Google Fonts repository on GitHub.

Note that each font has a different licence, so it's best to check the licence for your usage.

Set verify to true to attempt to connect to the mirror in this method for a better error message.

Since

0.16.0

Parameters

family

the name of the font, for example poppins or roboto.

style

the style of the font. These are normally standard, but please check individually if this method fails. Normal ones are Light, Regular, Bold, and Italic.