GoogleFont
class GoogleFont
A downloadable font from fonts.google.com
To learn more about the features supported by Google Fonts, see Get Started with the Google Fonts for Android
For a full list of fonts available on Android, see the Google Fonts Directory For Android XML.
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if name is empty |
Summary
Nested types |
|---|
class GoogleFont.ProviderAttributes used to create a |
Public constructors |
|---|
GoogleFont(name: String, bestEffort: Boolean) |
Public properties |
|
|---|---|
Boolean |
If besteffort is true and your query specifies a valid family name but the requested width/weight/italic value is not supported Google Fonts will return the best match it can find within the family. |
String |
Name of a font on Google fonts, such as "Roboto" or "Open Sans" |
Public constructors
GoogleFont
GoogleFont(name: String, bestEffort: Boolean = true)
| Parameters | |
|---|---|
name: String |
Name of a font on Google fonts, such as "Roboto" or "Open Sans" |
bestEffort: Boolean = true |
If besteffort is true and your query specifies a valid family name but the requested width/weight/italic value is not supported Google Fonts will return the best match it can find within the family. If false, exact matches will be returned only. |
Public properties
bestEffort
val bestEffort: Boolean
If besteffort is true and your query specifies a valid family name but the requested width/weight/italic value is not supported Google Fonts will return the best match it can find within the family. If false, exact matches will be returned only.