Get Started with the Google Fonts for Android
Stay organized with collections
Save and categorize content based on your preferences.
Android O and AndroidX Library add support for
Downloadable Fonts.
Google Fonts is shipping a Font Provider in Google Play Services. This means
Google Fonts are available to native apps on Android devices!
Which fonts can I use?
The entire Google Fonts Open Source collection! Visit
https://fonts.google.com to browse.
What versions of Android are supported?
Our provider supports Jelly Bean (API level 16) and up. This represents 95%+ of
of Android devices in the wild
(platform dashboard).
It can be accessed using APIs in AndroidX Library
(androidx.core)
or Android O (API level 26).
How can I get started!
To request a font from the Google Fonts provider use the following query format:
Parameter |
Required? |
Range |
Data Type |
Default value |
name |
Yes |
Any family from fonts.google.com |
string |
|
width |
No |
> 0 |
float |
100 |
weight |
No |
(0, 1000) exclusive |
int |
400 |
italic |
No |
[0, 1] inclusive |
float |
0 |
besteffort |
No |
true/false |
boolean |
true |
If besteffort is true and your query specifies a valid family name but the
requested width/weight/italic value is not supported we will return the best
match we can find within the family. For example, a request for
Oswald at weight 900 would return
Oswald at weight 700.
Sample queries:
name=Lobster # Lobster, 400 weight
name=Lato&weight=100 # Lato, 100 weight
name=Open Sans&weight=800&italic=1 # Open Sans, 800 weight, italic
Security
For security you must specify the signature of the application exposing the
provider you want to request fonts from. Android Studio will add
the correct signature for you. See
adding certificates.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-23 UTC.
[null,null,["Last updated 2024-07-23 UTC."],[[["\u003cp\u003eAndroid now supports downloadable fonts, including the entire Google Fonts collection, via Android O and AndroidX Library.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Fonts are readily available for native Android apps through a Font Provider in Google Play Services, supporting Android Jelly Bean (API level 16) and above.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access Google Fonts declaratively or programmatically and easily customize font attributes like width, weight, and italic style.\u003c/p\u003e\n"],["\u003cp\u003eA built-in "best effort" feature ensures the closest font match if the specific requested style is unavailable within the chosen font family.\u003c/p\u003e\n"],["\u003cp\u003eFor security, applications utilizing the Google Fonts provider must specify the provider's signature, a process simplified within Android Studio.\u003c/p\u003e\n"]]],[],null,["# Get Started with the Google Fonts for Android\n\nAndroid O and AndroidX Library add support for\n[Downloadable Fonts](https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html).\n\nGoogle Fonts is shipping a Font Provider in Google Play Services. This means\nGoogle Fonts are available to native apps on Android devices!\n\nWhich fonts can I use?\n----------------------\n\nThe entire Google Fonts Open Source collection! Visit\n\u003chttps://fonts.google.com\u003e to browse.\n\nWhat versions of Android are supported?\n---------------------------------------\n\nOur provider supports Jelly Bean (API level 16) and up. This represents 95%+ of\nof Android devices in the wild\n([platform dashboard](https://developer.android.com/about/dashboards/index.html#Platform)).\nIt can be accessed using APIs in AndroidX Library\n([androidx.core](https://developer.android.com/jetpack/androidx/releases/core))\nor Android O (API level 26).\n\nHow can I get started!\n----------------------\n\n- Check out the [demo app](https://github.com/android/user-interface-samples/tree/main/DownloadableFonts).\n- Try it in Android Studio 3.0 ([walkthrough with screenshots](https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html#via-android-studio))\n- Use Google Fonts declaratively or programmatically as shown in [Downloadable Fonts](https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html).\n\nQuery Format\n------------\n\nTo request a font from the Google Fonts provider use the following query format:\n\n| Parameter | Required? | Range | Data Type | Default value |\n|------------|-----------|----------------------------------|-----------|---------------|\n| name | Yes | Any family from fonts.google.com | string | |\n| width | No | \\\u003e 0 | float | 100 |\n| weight | No | (0, 1000) exclusive | int | 400 |\n| italic | No | \\[0, 1\\] inclusive | float | 0 |\n| besteffort | No | true/false | boolean | true |\n\nIf besteffort is true and your query specifies a valid family name but the\nrequested width/weight/italic value is not supported we will return the best\nmatch we can find within the family. For example, a request for\n[Oswald](https://fonts.google.com/specimen/Oswald) at weight 900 would return\nOswald at weight 700.\n\nSample queries: \n\n name=Lobster # Lobster, 400 weight\n name=Lato&weight=100 # Lato, 100 weight\n name=Open Sans&weight=800&italic=1 # Open Sans, 800 weight, italic\n\nSecurity\n--------\n\nFor security you must specify the signature of the application exposing the\nprovider you want to request fonts from. Android Studio will add\nthe correct signature for you. See\n[adding certificates](https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html#adding-certificates)."]]